vdbergh
vdbergh
This is the code for the custom handler... ```python class EventHandler(logging.Handler): def __init__(self): super().__init__(level=logging.ERROR) logging.disable(level=logging.CRITICAL) rundb = RunDb(is_primary_instance=False) logging.disable(level=logging.NOTSET) self.actiondb = rundb.actiondb def emit(self, record): message=self.format(record) self.actiondb.log_message( username="fishtest.system", message=message, )...
The logging section of `production.ini` ```ini [loggers] keys = root, fishtest [handlers] keys = console, events [formatters] keys = generic [logger_root] level = DEBUG handlers = console [logger_fishtest] level =...
I am not sure I understand. The handler is already created with level equal to level.ERROR. I don’t understand the need for a further test in emit(). I am AFK...
I changed the log levels from DEBUG to INFO and fixed a typo.
I now reverted the root level to ERROR and set the fishtest level to DEBUG so that we can use `logger.debug(message)` inside Fishtest (for example to instrument code). According to...
I switched back to using a single main logger (this pattern is also used by other packages). The main logger is the logger `fishtest` which is a child of the...
@ppigazzini Could you maybe have a look at this PR? It seems like a nobrainer (replacing print by logger.info) and tying into the Python logger framework has many benefits for...