logs

logs#

Logging tools

Functions

create_logger(logger[, file_log_level, ...])

Create file and stream logger at the wanted level for the given logger.

deprecation_warning(msg)

Create a depreciation warning.

init_basic_logger(curr_logger[, log_lvl, ...])

Initialize a very basic logger to trace the first lines in the stream.

init_logger(*args, **kwargs)

Init the right logger according the SERTIT_LOGGER_TYPE environment: - if SERTIT_LOGGER_TYPE == "STDOUT_BASIC", it creates a logger which outputs to STDOUT. Convenient for CLI tools - if SERTIT_LOGGER_TYPE == "STDOUT_JSON", logs are printed as JSON object to STDOUT. Convenient if you want to stream logs to another process via STDOUT. For example, a process running in the arcgispro-eo backend environment. - if SERTIT_LOGGER_TYPE == "STDOUT_FILE_ADVANCED", same as "STDOUT_BASIC" but logs are also recorded in a file. Returns:.

reset_logging()

Reset root logger

shutdown_logger(logger)

Shutdown logger (if you need to delete the log file for example)