set_loglevel
- eomaps.set_loglevel(level, fmt='timed')
Configure EOmaps’s logging levels (and formatting).
EOmaps uses the standard library logging framework under the root logger ‘eomaps’. This is a helper function to:
set EOmaps’s root logger level
set the root logger handler’s level, creating the handler if it does not exist yet
set the root logger handler’s formatter
Typically, one should call
set_loglevel("info")orset_loglevel("debug")to get additional debugging information.Users or applications that are installing their own logging handlers may want to directly manipulate
logging.getLogger('eomaps')rather than use this function.- Parameters:
level ({"notset", "debug", "info", "warning", "error", "critical"} or int) – The log level of the handler.
fmt (str) –
A short-name or a logging format-string.
Available short-names:
”plain”:
message”basic”:
<TIME>: message”timed”:
<TIME>: <LEVEL>: message”debug”:
<TIME>: <LEVEL>: <MODULE>: message
The default is
logging.BASIC_FORMAT>>> "%(levelname)s:%(name)s:%(message)s"
Notes
The first time this function is called, an additional handler is attached to the root handler of EOmaps; this handler is reused every time and this function simply manipulates the logger and handler’s level.