irsim.env.env_logger#
Classes#
Thin wrapper around Loguru used by IR-SIM environments. |
Module Contents#
- class irsim.env.env_logger.EnvLogger(log_file: str | None = 'irsim_error.log', log_level: str = 'WARNING')[源代码]#
Thin wrapper around Loguru used by IR-SIM environments.
Initialize the EnvLogger.
- 参数:
log_file (str, optional) -- Path to the log file. Default is 'irsim_error.log'.
log_level (str, optional) -- Logging level. Default is 'WARNING'.
- warning_once(msg: str, key: str | None = None) None[源代码]#
Log a warning the first time
key(default:msg) is seen, then at DEBUG.For per-step conditions that would otherwise flood the log every step.
- 参数:
msg (str) -- The message to log.
key (str, optional) -- Identity of the condition when
msgvaries.