Logger
Reserved Log Levels
These reserved log levels help filter and control which log messages get output to the console/main log and which go to only the
Action.logfile. By using the Debug settings when running a workflow, you can lower the required log level to appear in the main log.
- sane.logger.STDOUT = 18
The log level any stdout captured in
ActionorEnvironmentis output at
- sane.logger.ACT_INFO = 19
The default log level of
Action.log(), i.e. the log level mostActionactivity is output at
- sane.logger.MAIN_LOG = 20
The default log level needed to output to the main logfile/console
- class sane.logger.Logger[source]
User Interface
User Methods
- log(*args, level=None, **kwargs)[source]
Wrapper function around
logging.Logger.log()The
argsandkwargsparameters gets passed toprint()redirected into a string. The string is prefixed with [<current_logname>] and is then logged out using the current internallogging.Loggerand any format that logger applies.- Parameters:
level (int) – the logging level the message should be output as, default is
default_log_level
Internal API
The following documentation is provided for advanced use in the creation of custom classes.
- label_length
Pad length to use for generating message prefix (logname and scope)
- property logname
The current base logname of this object
- property current_logname
Give the current logname as would appear in messages, including scope context
- logger
- log_flush()[source]
Force flush all handlers associated with the internal
logging.Logger
- classmethod __new__(*args, **kwargs)