libmuscle.logging_handler module

class libmuscle.logging_handler.MuscleManagerHandler(instance_id: str, level: int, mmp_client: MMPClient)[source]

Bases: Handler

Standard Python log handler for the manager.

A MuscleManagerHandler is a standard Python log handler, which can be attached to a logger, and forwards log messages to the Muscle Manager for central logging.

emit(record: LogRecord) None[source]

Do the actual send to the manager

If this fails, then we drop the message, but we do keep track of how many messages were dropped and try to get that into the manager log, referring the user to the instance log.