Skip to main content

hns_console_logging

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.

Installation

pip install hns-console-logging

Usage

import hns_console_logging
logger = hns_console_logging.get_logger('test_module')
logger.info('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: https://docs.python.org/3/library/logging.html#logrecord-attributes

Metadata

Release files for hns-console-logging 20.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hns-console-logging 20.5
File Size Uploaded
hns_console_logging-20.5.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hns-console-logging 20.5
File Interpreter ABI Platform
hns_console_logging-20.5-py3-none-any.whl Python 3 none any Details

Total release size: 4.8 kB

Release files / hns_console_logging-20.5.tar.gz

Download URL hns_console_logging-20.5.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
acd48cd6c86427b3aa3075a4af047b1064cce14d15e5742b18fa764ad3c17dc4
BLAKE2b-256 checksum
How to use checksums
9099dfb723ec5e60c4a6caa8a0bbe694d6e992632b09806824289a9af7165a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release files / hns_console_logging-20.5-py3-none-any.whl

Download URL hns_console_logging-20.5-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
769fc2ed9e5eb39a83643393f794aeb02419e57792d03510f7a3e68ea87ea5bf
BLAKE2b-256 checksum
How to use checksums
247b1ca976fbc64754fda18ba271f2888ddb00fb281ffacc0596a4994a658953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

20.5 This release

2 release files

19.11

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page