logging.file module¶
Functions that configure pwfdf-api file logging streams.
Function |
Description |
|---|---|
Configures a file log stream at the DEBUG level |
|
Configures a file log stream at the INFO level |
|
Configures a file log at the WARNING level |
- pwfdf_api.logging.file.verbose(path, format=None, **handler_kwargs)¶
Adds a FileHandler at the DEBUG level
File Log
verbose(path) verbose(path, format)
Adds a FileHandler to the pwfdf-api’s base logger at the DEBUG level, and ensures the pwfdf-api base logger passes messages at this level. The
pathinput is the path to the file that will hold the log. Useformatto specify a logging format for the FileHandler. Here,formatmay either be a logging format string, or a logging.Formatter object.FileHandler Options
verbose(..., **handler_kwargs)
Specifies additional options for the FileHandler constructor.
- Inputs:
path (str | Path) – The path to the log file
format (str | logging.Formatter) – A logging format string or logging.Formatter object
handler_kwargs (Any) – Additional options for the logging.FileHandler constructor
- Outputs:
FileHandler – The new pwfdf-api FileHandler
- pwfdf_api.logging.file.info(path, format=None, **handler_kwargs)¶
Adds a FileHandler at the INFO level
File Log
info(path) info(path, format)
Adds a FileHandler to the pwfdf-api’s base logger at the INFO level, and ensures the pwfdf-api base logger passes messages at this level. The
pathinput is the path to the file that will hold the log. Useformatto specify a logging format for the FileHandler. Here,formatmay either be a logging format string, or a logging.Formatter object.FileHandler Options
info(..., **handler_kwargs)
Specifies additional options for the FileHandler constructor.
- Inputs:
path (str | Path) – The path to the log file
format (str | logging.Formatter) – A logging format string or logging.Formatter object
handler_kwargs (Any) – Additional options for the logging.FileHandler constructor
- Outputs:
FileHandler – The new pwfdf-api FileHandler
- pwfdf_api.logging.file.quiet(path, format=None, **handler_kwargs: Any)¶
Adds a FileHandler at the WARNING level
File Log
quiet(path) quiet(path, format)
Adds a FileHandler to the pwfdf-api’s base logger at the WARNING level, and ensures the pwfdf-api base logger passes messages at this level. The
pathinput is the path to the file that will hold the log. Useformatto specify a logging format for the FileHandler. Here,formatmay either be a logging format string, or a logging.Formatter object.FileHandler Options
quiet(..., **handler_kwargs)
Specifies additional options for the FileHandler constructor.
- Inputs:
path (str | Path) – The path to the log file
format (str | logging.Formatter) – A logging format string or logging.Formatter object
handler_kwargs (Any) – Additional options for the logging.FileHandler constructor
- Outputs:
FileHandler – The new pwfdf-api FileHandler