Skip to main content

A tiny logging tool

Project description

Security Status

logging4

A tiny logging tool

install

$pip install --upgrade logging4 

usage

import sys
import logging4

logger = logging4.Logger(name="MyLogger")

formatter = '[[time]] - [[name]] - [[level_name]] - [[msg]]'

# add/del channel
logger.add_channel(filename='log.txt', level=logging4.WARNING)
logger.add_channel(filename=sys.stdout, level=logging4.ERROR, formatter=formatter)
logger.add_channel(filename='log2.txt', level=logging4.INFO)
logger.del_channel(filename='log2.txt')

use logger:

logger.debug('logger debug message')
logger.info('logger info message')
logger.warning('logger warning message')
logger.error('logger error message')
logger.critical('logger critical message')

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

logging4-0.0.2.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

logging4-0.0.2-py3-none-any.whl (2.5 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