Logger

Inheritance diagram of musify.log.logger

All classes and operations relating to the logger objects used throughout the entire package.

Classes:

MusifyLogger(name[, level])

The logger for all logging operations in Musify.

class musify.log.logger.MusifyLogger(name, level=0)

Bases: Logger

The logger for all logging operations in Musify.

Attributes:

compact

When true, never print a new line in the console when print() is called

disable_bars

When true, all bars returned by get_progress_bar() will be disabled by default

file_paths

Get a list of the paths of all file handlers for this logger

stdout_handlers

Get a list of all logging.StreamHandler handlers that log to stdout

Methods:

info_extra(msg, *args, **kwargs)

Log 'msg % args' with severity 'INFO_EXTRA'.

report(msg, *args, **kwargs)

Log 'msg % args' with severity 'REPORT'.

stat(msg, *args, **kwargs)

Log 'msg % args' with severity 'STAT'.

print([level])

Print a new line only when DEBUG < logger level <= level for all console handlers

get_iterator([iterable, total])

Returns an appropriately configured tqdm progress bar if installed.

compact: bool = False

When true, never print a new line in the console when print() is called

disable_bars: bool = False

When true, all bars returned by get_progress_bar() will be disabled by default

property file_paths: list[str]

Get a list of the paths of all file handlers for this logger

property stdout_handlers: list[StreamHandler]

Get a list of all logging.StreamHandler handlers that log to stdout

info_extra(msg, *args, **kwargs)

Log ‘msg % args’ with severity ‘INFO_EXTRA’.

Return type:

None

report(msg, *args, **kwargs)

Log ‘msg % args’ with severity ‘REPORT’.

Return type:

None

stat(msg, *args, **kwargs)

Log ‘msg % args’ with severity ‘STAT’.

Return type:

None

print(level=51)

Print a new line only when DEBUG < logger level <= level for all console handlers

Return type:

None

get_iterator(iterable=None, total=None, **kwargs)

Returns an appropriately configured tqdm progress bar if installed. If not, returns the given iterable if given, or simply range(total). For tqdm kwargs, see tqdm_std

Return type:

Iterable[TypeVar(T)]