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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -