python - How to use a handler from settings for a non-Django log -
in django project, i'm using suds, logs predetermined log (suds.client) , doesn't let me configure different log messages. i'm trying around adding 1 of handlers have defined in settings.py. in code uses suds:
logging.basicconfig(level=logging.info) suds_logger = logging.getlogger('suds.client') suds_logger.setlevel(logging.info) suds_logger.addhandler('my_handler') suds_logger.propagate = false
this incorrect (because i'm passing string naming handler , not handler itself) , results in error:
error:my_handler:'str' object has no attribute 'level'
so, seems have correctly use 'my_handler' handler settings , should go. so, correct syntax?
Comments
Post a Comment