Skip to content

Commit

Permalink
build(deps): updated dependencies, made python-json-logger an optiona…
Browse files Browse the repository at this point in the history
…l dependency
  • Loading branch information
ErikBjare committed Apr 27, 2022
1 parent 22183fd commit 9ffe47c
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 183 deletions.
7 changes: 5 additions & 2 deletions aw_core/log.py
Expand Up @@ -4,8 +4,6 @@
from typing import Optional, List
from datetime import datetime

from pythonjsonlogger import jsonlogger

from . import dirs
from .decorators import deprecated

Expand Down Expand Up @@ -145,4 +143,9 @@ def log_format(x):

custom_format = " ".join(log_format(supported_keys))

try:
from pythonjsonlogger import jsonlogger
except ImportError:
raise ImportError("pythonjsonlogger is required to use json logging.")

return jsonlogger.JsonFormatter(custom_format)

0 comments on commit 9ffe47c

Please sign in to comment.