flambe.logging.logging
¶
Module Contents¶
-
flambe.logging.logging.
setup_global_logging
(console_log_level: int = logging.NOTSET) → None[source]¶ Set up flambe logging with a Stream handler and a Rotating File handler.
This method should be set before consuming any logger as it sets the basic configuration for all future logs.
After executing this method, all loggers will have the following handlers: * Stream handler: prints to std output all logs that above The console_log_level * Rotating File hanlder: 10MB log file located in Flambe global folder. Configured to store all logs (min level DEBUG)
Parameters: console_log_level (int) – The minimum log level for the Stream handler
-
class
flambe.logging.logging.
FlambeFilter
[source]¶ Bases:
logging.Filter
Filter all log records that don’t come from flambe or main.
-
class
flambe.logging.logging.
TrialLogging
(log_dir: str, verbose: bool = False, root_log_level: Optional[int] = None, capture_warnings: bool = True, console_prefix: Optional[str] = None, hyper_params: Optional[Dict] = None)[source]¶
-
class
flambe.logging.logging.
ContextInjection
(**attrs)[source]¶ Add specified attributes to all log records
Parameters: **attrs (Any) – Attributes that should be added to all log records, for use in downstream handlers