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, *args, **kwargs)

Print log message.

Parameters:

  • text (str) –

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

  • args

    Optional arguments to .format text with

  • kwargs

    Optional arguments to .format text with

inputs, outputs, messages and callables arguments are highlighted.

red

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

Print red log message.

yellow

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

Print yellow log message.

green

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

Print green log message.

cyan

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

Print cyan log message.

blue

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

Print blue log message.

magenta

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

Print magenta log message.