Skip to main content

Just a simple script to create a logger object for logging to console

Project description


Just a simple script to create a logger object for logging to console. It is intended to be used with services running as docker container. By using the logging facility in docker container, you don't need to write logs to the file, you can use the logs written to file by docker daemon.


pip install hns-console-logging


import hns_console_logging
logger = hns_console_logging.get_logger('test_module')'Info msg')

You can change the default log format and log level.
Default log format: %(asctime)s %(levelname)s %(name)s %(funcName)s [PID:%(process)d TID:%(thread)d] %(message)s
Default log level: INFO
Default formatter class: logging.Formatter

To change log format, please refer:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hns_console_logging-20.5.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

hns_console_logging-20.5-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page