pyloggr.main.shipper2fs

Ships events from RabbitMQ to the filesystem

class FSQueue(filename, period, frmt)[source]

Bases: object

Store events that have to be exported to a given filename

append(event)[source]

Add an event to the queue. The coroutine resolves when the event has been exported.

Parameters:event (pyloggr.event.Event) – event
flush()[source]

Actually flush the events to the file

stop()[source]

Stop the queue

class FilesystemShipper(rabbitmq_config, export_fs_config)[source]

Bases: object

The FilesystemShipper takes events from a RabbitMQ queue and writes them on filesystem

Parameters:
  • rabbitmq_config (pyloggr.rabbitmq.Configuration) – RabbitMQ configuration
  • export_fs_config (pyloggr.config.Shipper2FSConfig) – Log export configuration
_append(*args, **kwargs)[source]
export(message)[source]

Export event to filesystem

Parameters:message (RabbitMQMessage) – RabbitMQ message
launch()[source]

Start shipper2fs

shutdown()[source]

Shutdowns (stops definitely) the shipper.

stop()[source]

Stops the shipper