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.

Files for hns-console-logging, version 20.5
Filename, size File type Python version Upload date Hashes
Filename, size hns_console_logging-20.5-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size hns_console_logging-20.5.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page