From bf3c940b9d530638c97374090e130b89b8835dcc Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Thu, 27 Oct 2022 11:26:12 +0200 Subject: [PATCH] Add logging page --- docs/index.md | 7 ++----- docs/logging.md | 1 + mkdocs.yml | 5 +++++ 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 docs/logging.md diff --git a/docs/index.md b/docs/index.md index 945b807720..1cd2f1a7a2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -205,8 +205,7 @@ There are several ways to run uvicorn directly from your application. If you're looking for a programmatic equivalent of the `uvicorn` command line interface, use `uvicorn.run()`: -```python -# main.py +```py title="main.py" import uvicorn async def app(scope, receive, send): @@ -275,9 +274,7 @@ For more information, see the [deployment documentation](deployment.md). The `--factory` flag allows loading the application from a factory function, rather than an application instance directly. The factory will be called with no arguments and should return an ASGI application. -**example.py**: - -```python +```py title="example.py" def create_app(): app = ... return app diff --git a/docs/logging.md b/docs/logging.md new file mode 100644 index 0000000000..85f805b3bb --- /dev/null +++ b/docs/logging.md @@ -0,0 +1 @@ +# Logging \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index ed833a10c2..4f5fbfb89b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -30,6 +30,11 @@ nav: markdown_extensions: - admonition + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences - codehilite: css_class: highlight - toc: