logging addLevelName

jjesso at global-matrix.com jjesso at global-matrix.com
Tue Mar 8 18:46:56 CET 2005

I am trying to add a new logging level.

logging.CLIENT = logging.INFO + 1
logging.addLevelName( logging.CLIENT, 'CLIENT' )
logging.root.setLevel( [logging.INFO, logging.CLIENT, logging.WARNING,
logging.ERROR, logging.CRITICAL] )
logger = logging.getLogger(None)

I get error:

AttributeError: class Logger has no attribute 'client'

Any help?

More information about the Python-list mailing list