flux.eventlog module

class flux.eventlog.EventLogEvent(event)

Bases: dict

wrapper class for a single KVS EventLog entry

property context
property context_string
property name
property timestamp
class flux.eventlog.EventLogFormatter(format='text', timestamp_format='raw', color='auto')

Bases: object

Formatter for eventlog event entries

This class is used by utilities to format eventlog entries in with optional formatting such as colorization, human-readable and offset timestamps, etc.

BLUE = '\x1b[34m'
BOLD = '\x1b[1m'
GRAY = '\x1b[37m'
GREEN = '\x1b[32m'
MAGENTA = '\x1b[35m'
RED = '\x1b[31m'
YELLOW = '\x1b[33m'
eventlog_colors = {'exception': '\x1b[1m\x1b[31m', 'key': '\x1b[34m', 'name': '\x1b[33m', 'number': '\x1b[37m', 'time': '\x1b[32m', 'timebreak': '\x1b[1m\x1b[32m', 'value': '\x1b[35m'}
format(entry)

Format an eventlog entry :param entry: The entry to format.

If a dict, then the entry must conform to RFC 18.

Returns

The formatted eventlog entry as a string.

Return type

str