exception handler

Implements CoreExceptionHandler to stack and dump all low-level exceptions in case a CRITICAL log level message occurs.

class core4.logger.exception.CoreExceptionHandler(*args, level, size, target, **kwargs)[source]

This handler stacks all logging.DEBUG log records. If a log record with log level logging.CRITICAL appears, then all memorised log records are fed into sys.log MongoDB collection.

emit(record)[source]

Emit a record and flush() if a log level of logging.CRITICAL or above appears.

flush()[source]

Truncates the buffer of log records