PilotLoggingPlugin

Pilot logging plugin abstract class.

class DIRAC.WorkloadManagementSystem.Client.PilotLoggingPlugins.PilotLoggingPlugin.PilotLoggingPlugin

Bases: ABC

Remote pilot logging bas abstract class. It defines abstract methods used to sent messages to the server. Any pilot logger plugin should inherit from this class and implement a (sub)set of methods required by TornadoPilotLoggingHandler.

abstract finaliseLogs(payload, pilotID, vo)

Log finaliser method. To indicate that the log is now complete.

Parameters:
  • payload (dict) – additional info, a plugin might want to use (i.e. the system return code of a pilot script)

  • pilotID (str) – unique pilot ID.

  • vo (str) – VO name of a pilot which sent the message.

Returns:

S_OK or S_ERROR

Return type:

dict

abstract sendMessage(message, pilotID, vo)

sendMessage method, carrying the unique pilot identity and a VO name.

Parameters:
  • message (str) – text to log in json format

  • pilotID (str) – pilot id. Optimally it should be a pilot stamp if available, otherwise a generated UUID.

  • vo (str) – VO name of a pilot which sent the message.

Returns:

S_OK or S_ERROR

Return type:

dict