API Reference
Table of Contents
logtron_aws Module
autodiscover
def autodiscover(
name=None,
level=logging.INFO,
**kwargs,
):
...
Returns:
- A python
logging.Loggerinstance configured for JSON logging.
Parameters:
| Parameter | Description |
|---|---|
name | The name of the logger. This works exactly as with logging.getLogger(name). |
level | The log level as defined in the logging package. |
The accepted keyword arguments are:
| Parameter | Description |
|---|---|
flatten | If True, Logtron will flatten the JSON logs so that nested entries like extra and context are flattened to top level JSON keys. |
refresh | Forces re-initialization if set to True. Logtron will only initialize the first time autodiscover is called by default. |
config | Explicit Logtron configuration. |
discover_config | Function to override the default configuration discovery process. |
discover_context | Function to override the default context discovery process. |