Skip to content

Commit

Permalink
Change to default logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Nov 4, 2023
1 parent a224819 commit 43fff97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions backend/api_app/controllers/categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

logger = get_logger(__name__)


"""
/categories/{category_id} a specific app
"""
Expand Down
14 changes: 7 additions & 7 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from litestar.config.cors import CORSConfig
from litestar.logging import LoggingConfig

# from litestar.logging import LoggingConfig
import logging

from litestar.openapi import OpenAPIConfig, OpenAPIController

cors_config = CORSConfig(
Expand All @@ -20,14 +21,13 @@ class MyOpenAPIController(OpenAPIController):


logging_config = LoggingConfig(
loggers={
"my_app": {
"level": "DEBUG",
"handlers": ["queue_listener"],
}
}
root={"level": logging.getLevelName(logging.INFO), "handlers": ["console"]},
formatters={
"standard": {"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"}
},
)


app = Litestar(
route_handlers=[AppController, CategoryController, RankingsController],
cors_config=cors_config,
Expand Down

0 comments on commit 43fff97

Please sign in to comment.