agent = require("agent")

journaldShortParser = agent.processor.regexp(
    # requirer
    regexp = '^(?P<time>[^ ]* {1,2}[^ ]* [^ ]*) (?P<ident>[a-zA-Z0-9_/\\\\.\\\\-]*)(?:\\\\[(?P<pid>[0-9]+)\\\\])?(?:[^\\\\:]*\\\\:)? *(?P<message>.*)',
    
    # required, 
    path   = "log"
)

Splits part of an input log message according to provided regex and replace said part of the message by structure that has a field for each named part of the regex