scrolls.factories.message module

class scrolls.factories.message.MessageFactory(dependencies, request=None)[source]

Bases: object

Responsible for creating Message objects.

See scrolls.models.message.Message

createId(mdict)[source]

Create an ID for the message based on dictionary mdict.

The id is a combination of the timestamp and a 6 character unique id.

parseFrom(rsyslogString, withId=None)[source]

Create a Message by parsing the rsyslog data string

If no pre-made id is passed as withId, a new one is generated.