python-json-logger
python-json-logger copied to clipboard
Json Formatter for the standard python logger
When a dictionary is passed as a message to `logger.exception`, it can be modified unexpectedly, and this can cause issues if the dict is reused. For instance, this code will...
Hi, I am using this lib to print the logs in CF but some of the logs are not being printed in Google Cloud logs. Google says to give log...
I still see this in my logs: ``` flask_sqlalchemy/__init__.py:834: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to...
I'm trying to make jsonlogger wotk with dictconfig. I tried this: ```python def setup_logging(loglevel, path): cfg = { "version": 1, "disable_existing_loggers": True, "formatters": { "json": { "class": "pythonjsonlogger.jsonlogger.JsonFormatter", "format": "%(asctime)s.%(msecs)03d...
I'm trying to use this library so i can output json logs to stdout. **src/logger.py** ``` import logging from pythonjsonlogger import jsonlogger logger = logging.getLogger() logHandler = logging.StreamHandler() formatter =...
`testFormatKeys` makes assertions about supported keys found in the JSON output, but not about ones that aren't found. All assertions are of the form `self.assertTrue(True)`, which cannot fail if a...
Running the command `python -m unittest` results in the error: ``` from pythonjsonlogger import jsonlogger ModuleNotFoundError: No module named 'pythonjsonlogger' ```
Since Python 3.2, formatters support new "{" and "${" [styles](https://docs.python.org/3/howto/logging-cookbook.html#formatting-styles), however JsonFormatter's parse method explicitly [expects](https://github.com/madzak/python-json-logger/blob/master/src/pythonjsonlogger/jsonlogger.py#L147) "%" notation. This results in empty message is e.g. `{message}` used as logger formatting...
I am making a Discord bot(which, I know is unrelated to this repository) and I'm using JSON. Whenever I try to run the commands using JSON, however, I keep getting...
I have been using this excellent library for many different services where it works great. However, I've tried to use it for some API services that I can't get it...