Skip to content

log

critical

critical(message, tag='untagged', stacklevel=3)

Log a critical error message.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

debug

debug(message, tag='untagged', stacklevel=3)

Log a debug message. Debug messages are prefaced with the file and line number where this function was called.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

Example:

some_string = 'hello'
log.debug(f'some_string is {some_string}')
# DEBUG filename.py:123 : [untagged] some_string is hello

debug_stack

debug_stack(tag='untagged', stacklevel=3)

Log the current stack trace.

Parameters:

Name Type Description Default
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

error

error(message, tag='untagged', stacklevel=3)

Log an error message.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

info

info(message, tag='untagged', stacklevel=3)

Log an informational message.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

verbose_debug

verbose_debug(message, tag='untagged', stacklevel=3)

Log a verbose debug message. A verbose debug message provides additional detail, and is only logged if the verbose flag is set.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3

warning

warning(message, tag='untagged', stacklevel=3)

Log a warning message.

Parameters:

Name Type Description Default
message str

The message to log.

required
tag str

A string that can be used to filter log messages.

'untagged'
stacklevel int

The number of stack frames to skip when determining the location of the log message. The default value of 3 is usually appropriate.

3