flexget.log module#
- class flexget.log.InterceptHandler(level=0)[source]#
Bases:
HandlerCatch any stdlib log messages from our deps and propagate to loguru.
- flexget.log._log_filterer(record)[source]#
Add the function to our loguru handlers. It will dynamically use all filters we add later.
- flexget.log.add_filter(func)[source]#
Add a filter function to the log handlers.
- Parameters:
func (Callable[[loguru.Record], bool])
- flexget.log.capture_logs(*args, **kwargs)[source]#
Take the same arguments as logger.add, but this sync will only log messages contained in context.
- Return type:
Iterator
- flexget.log.initialize(unit_test=False)[source]#
Prepare logging.
- Parameters:
unit_test (bool)
- Return type:
None