Muscat.Helpers.Logger module

class CatchLog(*args, **kwargs)[source]

Bases: Handler

Class to capture the logger output To be used with a with :

with Logger.CatchLog() as e:

Logger.Warning(“hello”) assert e.messages[‘warning’][0] == “hello”

emit(record)[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

reset()[source]
CheckIntegrity(GUI: bool = False)[source]
class ContextFilter(name: str = '')[source]

Bases: Filter

static GetHeader()[source]
filter(record)[source]

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

Critical(msg, *args, **kwargs)[source]
Debug(msg, *args, **kwargs)[source]
DefaultMuscatOutput()[source]
Error(msg, *args, **kwargs)[source]
ForcePrint(msg, *args, **kwargs)[source]
GetDiffTime()[source]
GetFormattedTime()[source]
Info(msg, *args, **kwargs)[source]
IsVerboseMuscatOutput()[source]
MinimalMuscatOutput()[source]
Print(msg, *args, **kwargs)[source]
ResetStartTime() None[source]

Function to reset the start time of a program.

SetMuscatLogLevel(logger_level)[source]
SetUpMuscatLogger(logger: Logger)[source]
SetUseDifferentialTime(val: bool) None[source]

Function to set the printing format

Parameters:

val (bool) – True to print the time from the beginning of the program or False to print the current time, defaults to [True]

SilentAllMuscatOutput()[source]
VerboseMuscatOutput()[source]
Warning(msg, *args, **kwargs)[source]