magrittetorch.utils.logger
Simple class for adjusting terminal output.
- enum magrittetorch.utils.logger.Level(value)
Enum for the importance level of a message
Valid values are as follows:
- DEBUG = <Level.DEBUG: 0>
- INFO = <Level.INFO: 1>
- WARNING = <Level.WARNING: 2>
- ERROR = <Level.ERROR: 3>
- class magrittetorch.utils.logger.Logger(level=None)
- log(message: str, level: Level = Level.INFO)
Prints the message to the console if the level of the message is higher than the level of the logger
- Parameters:
level (Level, optional) – Importance level of the message. Defaults to Level.INFO.
message (str) – message to be printed
- default_level = 2
Can be set by the user/dev to control the verbosity of the logger