A
Andreas Jung
I am trying to write a custom logger with a custom handler:
class MyHandler(StreamHandler):
pass
class Logger:
def __init__(self):
self._l = logging.getLogger('someident')
self._l.addHandler(MyHandler('/path/to/logfile'))
Now I want to configure this logger through a configuration
file. How can I refer to the new handler in the configuration file?
Something like "class=MyHandler" did not work.
Any ideas?
Thanks,
Andreas
class MyHandler(StreamHandler):
pass
class Logger:
def __init__(self):
self._l = logging.getLogger('someident')
self._l.addHandler(MyHandler('/path/to/logfile'))
Now I want to configure this logger through a configuration
file. How can I refer to the new handler in the configuration file?
Something like "class=MyHandler" did not work.
Any ideas?
Thanks,
Andreas