Skip to content

Logging

log

Prints log messages to GUI Log widget or console. Can print messages in different text colors and highlight object representations.

Example

log('message') for new log entry

log.red('red message') for log entry printed in red color

log('{call} received {msg}', call=call_function, msg=some_msg) for log entry with highlighted object representations.

__call__

__call__(text: str | Any, *args: Any, **kwargs: Any)

Print log message.

Parameters:

  • text (str | Any) –

    Log entry to print. Use .format style string to insert kwargs

  • args (Any, default: () ) –

    Optional arguments to .format text with

  • kwargs (Any, default: {} ) –

    Optional arguments to .format text with

inputs, outputs, messages and callable arguments are highlighted.

red

red(text: str | Any, *args, **kwargs) -> None

Print red log message

yellow

yellow(text: str | Any, *args, **kwargs) -> None

Print yellow log message

green

green(text: str | Any, *args, **kwargs) -> None

Print green log message

cyan

cyan(text: str | Any, *args, **kwargs) -> None

Print cyan log message

blue

blue(text: str | Any, *args, **kwargs) -> None

Print blue log message

magenta

magenta(text: str | Any, *args, **kwargs) -> None

Print magenta log message