Logging handler
Module to configure project logging.
FilterSensitiveData
¶
Bases: logging.Filter
Logging filter to hide sensitive data from being shown in the logs.
Source code in mkdocs/lakehouse_engine/packages/utils/logging_handler.py
filter(record)
¶
Hide sensitive information from being shown in the logs.
Based on the configured regex and replace strings, the content of the log records is replaced and then all the records are allowed to be logged (return True).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
record |
logging.LogRecord
|
the LogRecord event being logged. |
required |
Returns:
Type | Description |
---|---|
bool
|
The transformed record to be logged. |
Source code in mkdocs/lakehouse_engine/packages/utils/logging_handler.py
LoggingHandler
¶
Bases: object
Handle the logging of the lakehouse engine project.
Source code in mkdocs/lakehouse_engine/packages/utils/logging_handler.py
__init__(class_name)
¶
Construct a LoggingHandler instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
class_name |
str
|
name of the class to be indicated in the logs. |
required |
Source code in mkdocs/lakehouse_engine/packages/utils/logging_handler.py
get_logger()
¶
Get the _logger instance variable.
Returns:
Type | Description |
---|---|
logging.Logger
|
logging.Logger: the logger object. |