libmuscle.logging_handler module

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

Bases: logging.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.

Create a MuscleManagerHandler.

Parameters
  • instance_id – The name of the instance we’re logging for.

  • level – The initial log level to use.

  • mmp_client – The MMP Client to submit log messages to.

emit(record: logging.LogRecord) None[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.