Skip to main content

Dumper

Monitor events.

Attributes

AttributeTypeDescription
outfile-like object = sys.stdoutThe output stream where event logs and messages are written, defaulting to standard output.

Constructor

Signature

def Dumper(
out: file-like object = sys.stdout
) - > null

Parameters

NameTypeDescription
outfile-like object = sys.stdoutThe output stream where events will be written.

Signature

def Dumper(
out: file-like object = sys.stdout
)

Parameters

NameTypeDescription
outfile-like object = sys.stdoutThe output stream where event logs and messages will be written, defaulting to standard output.

Methods


say()

@classmethod
def say(
msg: string
)

Writes a message to the configured output stream and flushes the buffer to ensure the output is immediately available for piping.

Parameters

NameTypeDescription
msgstringThe text message or log entry to be written to the output stream.

on_event()

@classmethod
def on_event(
ev: dict
) - > string|null

Processes an incoming event dictionary, updating internal task tracking and routing the data to the appropriate formatter for output.

Parameters

NameTypeDescription
evdictThe raw event data containing a timestamp, event type, hostname, and associated metadata.

Returns

TypeDescription
`stringnull`

format_task_event()

@classmethod
def format_task_event(
hostname: string,
timestamp: datetime,
type: string,
task: string,
event: dict
)

Formats and outputs task-specific event data including the hostname, timestamp, task identity, and additional event fields.

Parameters

NameTypeDescription
hostnamestringThe name of the host where the task event originated.
timestampdatetimeThe UTC timestamp representing when the event occurred.
typestringThe specific type of task event, such as 'task-received' or 'task-started'.
taskstringThe formatted task string containing the task name, UUID, and arguments.
eventdictA dictionary of remaining metadata fields to be serialized into the output.