Skip to content

Commit

Permalink
Add logging page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Oct 27, 2022
1 parent b347e69 commit e23c673
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Logging
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ edit_uri: ""
nav:
- Introduction: "index.md"
- Settings: "settings.md"
- Logging: "logging.md"
- Deployment: "deployment.md"
- Server Behavior: "server-behavior.md"
- Contributing: "contributing.md"

markdown_extensions:
- admonition
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- codehilite:
css_class: highlight
- toc:
Expand Down

0 comments on commit e23c673

Please sign in to comment.