Skip to content

Loggers

LogConfig (Adele)

adele.loggers.adele_logger.LogConfig

Logging configuration to be set for the server

Parameters:

Name Type Description Default
name str

The name of your logger, typically the application or API that the logger is being used in

required
log_level str

Default log level of your logger, default value is 'DEBUG'

'DEBUG'
log_fomat str

The format of how logs are printed, default value is '%(levelprefix)s | %(asctime)s | %(message)s'

required

Examples:

>>> encoding_logger = LogConfig("lakehouse_api").logger
>>> encoding_logger.info("This happened")
>>> encoding_logger.error("Uh oh")
>>> airflow_logger = LogConfig("airflow").logger
>>> airflow_logger.info("And this happened in Airflow")
config property readonly

Configurations property for logger

Returns:

Type Description
dict

The logger configurations

logger property readonly

The logger itself with configurations applied

Examples:

>>> mylogger = LogConfig("example").logger
>>> mylogger.info("my informational message")
>>> mylogger.error("my error message")
>>> mylogger.critical("my critical message")
>>> mylogger.warning("my warning message")

Returns:

Type Description
logging.Logger

The logger

LogConfig (Uvicorn)

adele.loggers.uvicorn_logger.LogConfig

Logging configuration to be set for the server

Parameters:

Name Type Description Default
name str

The name of your logger, typically the application or API that the logger is being used in

required
log_level str

Default log level of your logger, default value is 'DEBUG'

'DEBUG'
log_fomat str

The format of how logs are printed, default value is '%(levelprefix)s | %(asctime)s | %(message)s'

required

Examples:

>>> encoding_logger = LogConfig("lakehouse_api").logger
>>> encoding_logger.info("This happened")
>>> encoding_logger.error("Uh oh")
>>> airflow_logger = LogConfig("airflow").logger
>>> airflow_logger.info("And this happened in Airflow")
config property readonly

Configurations property for logger

Returns:

Type Description
dict

The logger configurations

logger property readonly

The logger itself with configurations applied

Examples:

>>> mylogger = LogConfig("example").logger
>>> mylogger.info("my informational message")
>>> mylogger.error("my error message")
>>> mylogger.critical("my critical message")
>>> mylogger.warning("my warning message")

Returns:

Type Description
logging.Logger

The logger


Last update: 2022-02-04
Back to top