Skip to content

guofei9987/logging4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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')

About

a tiny logging tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages