jade.events.StructuredLogEvent

class jade.events.StructuredLogEvent(source, category, name, message, **kwargs)[source]

Bases: object

A class for recording structured log events.

Initialize the class

Parameters:
  • source (str,) – The source of the event.

  • category (str,) – An event category given by the user.

  • name (str,) – An event name given by the user.

  • message – An event message given the user.

  • kwargs – Other information that the user needs to record into event.

Methods

base_field_names()

Return the base field names for the event.

deserialize(record)

Deserialize event from JSON.

field_names()

Return all field names for the event.

to_dict()

Convert event object to dict

values()

Return the values for all fields in the event.

base_field_names()[source]

Return the base field names for the event.

Return type:

list

field_names()[source]

Return all field names for the event.

Return type:

list

values()[source]

Return the values for all fields in the event.

Return type:

list

classmethod deserialize(record)[source]

Deserialize event from JSON.

Parameters:

record (dict)

Return type:

StructuredLogEvent

to_dict()[source]

Convert event object to dict