Skip to content

Uses structlog to create two loggers, a stdout logger with key-value args and optional colour, and a file logger in JSON format with log-rotation.

License

Notifications You must be signed in to change notification settings

mattdavis90/structlogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StructLogger Version Docs

Compatibility Implementations Format Code_Style

Uses structlog to create two loggers, a stdout logger with key-value args and optional colour, and a file logger in JSON format with log-rotation.

Documentation

StructLogger's documentation can be found at https://structlogger.readthedocs.io

Installing StructLogger

StructLogger can be installed from Pypi using pip:

pip install structlogger

Example

StructLogger defines a set of standard parameters that should get you going quickly and easily. Settings are retrofitted to the standard logging module to ensure any of your dependencies will adhere to the same logging format.

import structlog
from structlogger import configure_logger, __version__

configure_logger()

log = structlog.getLogger()

log.info('Welcome to structlogger', version=__version__)

About

Uses structlog to create two loggers, a stdout logger with key-value args and optional colour, and a file logger in JSON format with log-rotation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages