libmuscle.logging module¶
- class libmuscle.logging.LogLevel(value)[source]¶
Bases:
enum.Enum
Log levels for MUSCLE3.
These match the levels in the MUSCLE Manager Protocol, and should be kept identical to those. They also match the Python logging log levels.
- CRITICAL = 50¶
- DEBUG = 10¶
- DISABLE = 100¶
- ERROR = 40¶
- INFO = 20¶
- LOCAL = 0¶
- WARNING = 30¶
- static from_python_level(level: int) libmuscle.logging.LogLevel [source]¶
Creates a LogLevel from a Python log level.
- Parameters
level – A standard Python log level, such as logging.WARNING.
- Returns
The same level, but as a LogLevel.
- class libmuscle.logging.LogMessage(instance_id: str, timestamp: libmuscle.timestamp.Timestamp, level: libmuscle.logging.LogLevel, text: str)[source]¶
Bases:
object
A log message as used by MUSCLE3.
- Parameters
instance_id – The identifier of the instance that generated this message.
timestamp – When the message was generated (real-world, not simulation).
level – Log level of the message.
text – Content of the message.
- instance_id¶
The identifier of the instance that generated this message.
- timestamp¶
When the message was generated (real-world, not simulation).
- level¶
Log level of the message.
- text¶
Content of the message.