Creating a loglevel field

The format of a typical stanza in transforms.conf looks like this:

[myapp_loglevel] 
REGEX = s([A-Z]+)s 
FORMAT = loglevel::$1 
WRITE_META = True 

This will add to our events the field loglevel=DEBUG. This is a good idea if the values of loglevel are common words outside of this location, for instance ERROR.

Walking through this stanza, we have the following: