Handler
TidyLogHandler
Generic log handler for system error streams.
Attributes:
Name | Type | Description |
---|---|---|
sink |
str | Path | TextIO
|
Destination for receiving logging messages. |
level |
str
|
Minimum level to trace in logs. See |
format |
str
|
Template used for logged messages. |
diagnose |
bool
|
Whether the exception trace should display the variables values to eases the debugging. |
catch |
bool
|
Whether errors occurring while sink handles logs messages should be automatically caught. If True, an exception message is displayed on sys.stderr but the exception is not propagated to the caller, preventing your app to crash. |
pattern
property
Pattern for logging instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pattern
|
str
|
Template used for parsing logged messages. |
required |
Returns:
Type | Description |
---|---|
str
|
Pattern for logging instance. |
save
Return configurations as dict.
Returns:
Type | Description |
---|---|
dict
|
Collection of attributes for context. |
summarize
Summarize contents at source
.
Returns:
Type | Description |
---|---|
dict
|
Statistics of contents at |
TidyFileHandler
TidyMemoHandler
Bases: TidyFileHandler
Log handler for serialized streams.
Attributes:
Name | Type | Description |
---|---|---|
serialize |
bool
|
Whether the logged message and its records should be first converted to a JSON string before being sent to the sink. |