python-json-logger
python-json-logger copied to clipboard
Json Formatter for the standard python logger
Attribute `created` of LogRecord is `time.time_ns` since Python 3.13: https://docs.python.org/3.13/library/logging.html#logrecord-attributes This is not a backwards compatible change.
My apologies for such a fussy, small change. This does not affect runtime behavior but helps users of this package who are using a strict typechecker like `mypy --strict`. I...
Remove the redundant exception checking Fix timestamp str check
valid String template: `'$asctime $level $message'` regex for string template in [`JsonFormatter.parse`: ](https://github.com/madzak/python-json-logger/blob/5f85723f4693c7289724fdcda84cfc0b62da74d4/src/pythonjsonlogger/jsonlogger.py#L180) ```python .... elif isinstance(self._style, logging.StrFormatStyle): formatter_style_pattern = re.compile(r"\{(.+?)\}", re.IGNORECASE) ... ``` would require the string template to...
I noticed that there is no official support yet for Python 3.12. What would be needed for this? From what I can see the only currently open issue for this...
@madzak has transferred ownership of the `python-json-logger` PyPI project. Please use [nhairs/python-json-logger](https://github.com/nhairs/python-json-logger).
Hi! With Python 3.13 we're seeing the following test failure on 2.0.7. ``` ___________ TestJsonLogger.test_json_default_encoder_with_timestamp ____________ self = time_mock = @unittest.mock.patch('time.time', return_value=1500000000.0) def test_json_default_encoder_with_timestamp(self, time_mock): fr = jsonlogger.JsonFormatter(timestamp=True) self.log_handler.setFormatter(fr) self.log.info("Hello")...