Skip to content

Commit

Permalink
Merge pull request #339 from Sema4AI/improve-logging
Browse files Browse the repository at this point in the history
Improve logging
  • Loading branch information
mkorpela authored May 16, 2024
2 parents 2cec393 + 5635a2d commit b85eb8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions backend/app/lifespan.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ async def lifespan(app: FastAPI):
structlog.configure(
processors=[
structlog.stdlib.filter_by_level,
structlog.stdlib.add_logger_name,
structlog.stdlib.add_log_level,
structlog.stdlib.PositionalArgumentsFormatter(),
structlog.processors.TimeStamper(fmt="iso"),
structlog.processors.StackInfoRenderer(),
structlog.processors.format_exc_info,
structlog.processors.UnicodeDecoder(),
structlog.stdlib.render_to_log_kwargs,
],
Expand Down
3 changes: 2 additions & 1 deletion backend/log_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"fmt": "%(asctime)s - %(name)s - %(levelprefix)s %(client_addr)s - \"%(request_line)s\" %(status_code)s"
},
"json": {
"()": "pythonjsonlogger.jsonlogger.JsonFormatter"
"()": "pythonjsonlogger.jsonlogger.JsonFormatter",
"fmt": "%(asctime)s - %(name)s - %(levelname)s %(message)s"
}
},
"handlers": {
Expand Down

0 comments on commit b85eb8d

Please sign in to comment.