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.config.fileConfig("bengineLog.cfg")
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)
logging.Logger.client('test')

I get error:

AttributeError: class Logger has no attribute 'client'

Any help?




More information about the Python-list mailing list