Filter
All logging filters specific to this package.
Functions:
|
Set fully qualified path name to function including class name to the given record. |
Classes:
|
Filter for logging to the console. |
|
Filter for logging to a file. |
- musify.log.filter.format_full_func_name(record, width=40)
Set fully qualified path name to function including class name to the given record. Optionally, provide a max
width
to attempt to truncate the path name to by taking only the first letter of each part of the path until the length is equal towidth
.- Return type:
None
- class musify.log.filter.LogConsoleFilter(name='', module_width=40)
Bases:
Filter
Filter for logging to the console.
- Parameters:
module_width (
int
(default:40
)) – The maximum width a module string can be in the log record. Truncates module string if longer that this length.
Attributes:
Methods:
filter
(record)Determine if the specified record is to be logged.
- module_width
- filter(record)
Determine if the specified record is to be logged.
Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.
- Return type:
LogRecord
|None
- class musify.log.filter.LogFileFilter(name='', module_width=40)
Bases:
Filter
Filter for logging to a file.
- Parameters:
module_width (
int
(default:40
)) – The maximum width a module string can be in the log record. Truncates module string if longer that this length.
Attributes:
Methods:
filter
(record)Determine if the specified record is to be logged.
- module_width
- filter(record)
Determine if the specified record is to be logged.
Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.
- Return type:
LogRecord