You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With version 1.0.3, python 3.7 on Mac OS X on a freshly created virtual env.
Simple program:
importloggingimportjson_logging# log is initialized without a web framework namejson_logging.ENABLE_JSON_LOGGING=Truejson_logging.init_non_web()
logging.basicConfig(level=logging.DEBUG)
json_logging.config_root_logger()
logger=logging.getLogger("test logger")
logger.info("test log statement")
logger.info("test log statement", extra={'props': {"extra_property": 'extra_value'}})
Fails with the following error:
Traceback (most recent call last):
File "root_logger.py", line 10, in <module>
json_logging.config_root_logger()
File "/Users/xtof/Documents/Dev/Python/json-logging/venv/lib/python3.7/site-packages/json_logging/__init__.py", line 90, in config_root_logger
request_logger = _current_framework['app_request_instrumentation_configurator']().get_request_logger()
TypeError: 'NoneType' object is not subscriptable
The text was updated successfully, but these errors were encountered:
ggtools
changed the title
config_root_logger() does not work
config_root_logger() does not work for non web
Sep 5, 2019
ggtools
added a commit
to ggtools/json-logging-python
that referenced
this issue
Sep 5, 2019
With version 1.0.3, python 3.7 on Mac OS X on a freshly created virtual env.
Simple program:
Fails with the following error:
The text was updated successfully, but these errors were encountered: