slimta.logging.queuestorage

Utilities to make logging consistent and easy for any QueueStorage interaction.

class slimta.logging.queuestorage.QueueStorageLogger(log)

Bases: object

Provides a limited set of log methods that slimta packages may use. This prevents free-form logs from mixing in with standard, machine- parseable logs.

Parameters:loglogging.Logger object to log through.
write(id, envelope)

Logs a new Envelope being written to the queue storage.

Parameters:
  • id – The ID string that identifies the message in storage.
  • envelope – The Envelope being written to storage.
update_meta(id[, **what])

Logs operations that modify the metadata associated with an Envelope in queue storage.

Parameters:
  • id – The ID string that identifies the message in storage.
  • what – What is being changed in the metadata.
remove(id)

Logs when an Envelope is removed from the queue, which could be because of success or failure.

Parameters:id – The ID string that identifies the message in storage.