Skip to main content

fabric.logging_utils

to_snake_case

def to_snake_case(string: str) -> str

Convert a string from camel case to snake case.

set_logging_defaults

def set_logging_defaults(log_source: str = "Sys",
log_object: str = "Sys",
log_file: str = None)

Configure default logging settings.

Arguments:

  • log_object - The name of the object to log.
  • log_file - Path to the log file. If None, a temporary file will be used.

reset_logging

def reset_logging()

Reset logging level to NOTSET.

critical_logging

def critical_logging()

Set logging level to CRITICAL.

error_logging

def error_logging()

Set logging level to ERROR.

warning_logging

def warning_logging()

Set logging level to WARNING.

info_logging

def info_logging()

Set logging level to INFO.

debug_logging

def debug_logging()

Set logging level to DEBUG.

get_logger

def get_logger(name: str = None)

Get a logger with the specified name.

Arguments:

  • name - The name of the logger. If None, returns the root logger.

Returns:

A logger instance.