libmuscle.logging module¶
- class libmuscle.logging.LogLevel(value)[source]¶
Bases:
Enum
Log levels for MUSCLE 3.
These match the levels in the MUSCLE Manager Protocol, and should be kept identical to those. They also match the Python logging log levels, although not numerically.
- CRITICAL = 5¶
- DEBUG = 0¶
- ERROR = 4¶
- INFO = 1¶
- WARNING = 3¶
- static from_grpc(level: <google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x7f1836109780>) LogLevel [source]¶
Creates a log level from a gRPC-generated LogLevel message.
- Parameters
level – A log level, received from gRPC.
- Returns
The same log level, as a LogLevel.
- class libmuscle.logging.LogMessage(instance_id: str, timestamp: Timestamp, level: LogLevel, text: str)[source]¶
Bases:
object
A log message as used by MUSCLE 3.
- 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.