Added
- Added a new `JsonLogger` class that logs messages in JSON format. Supports
child loggers as well. The logger inherits from builtin `logging.Logger` and
the log methods have the same API as the builtin as well. Example usage:
python
from lifeomic_logging import JsonLogger
Create a logger with a name and optional context that will be included
on all log messages.
logger = JsonLogger("my-logger", {"foo": "bar"})
logger.info({"msg": "message", "isTrue": True})
>>> {"name": "my-logger", "foo": "bar", "level": "INFO", "msg": "message", "isTrue": true}
child_logger = logger.child({"fizz": "buzz"})
child.info("message")
>>> {"name": "my-logger", "foo": "bar", "fizz": "buzz", "level": "INFO", "msg": "message"}