MQPilotLoggingPlugin

MeessageQueue Pilot logging plugin. Just log messages.

class DIRAC.WorkloadManagementSystem.Client.PilotLoggingPlugins.MQPilotLoggingPlugin.MQPilotLoggingPlugin

Bases: PilotLoggingPlugin

A template of a MQ logging plugin. It gets the message and converts it to a list of Dictionaries to be shipped to a remote MQ service

__init__()
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

sendMessage(message, pilotID, vo)

A message could of a form: 2022-06-10T11:02:02,823512Z DEBUG [pilotLogger] X509_USER_PROXY=/scratch/dir_2313/user.proxy

Parameters:
  • message (str) – text to log

  • 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:

None

Return type:

None