-
Notifications
You must be signed in to change notification settings - Fork 244
Formatting
Seelog provides functionality to change format of messages that are sent to byte receivers. Formats are set in 'formats' config section, like this:
<formats>
<format id="common" format="[%LEV] %Msg"/>
<format id="critical" format="%Time %Date %RelFile %Func %Msg"/>
<format id="criticalemail" format="Critical error on our server!\n %Time %Date %RelFile %Func %Msg \nSent by Seelog"/>
</formats>
Each 'format' node has an 'id' and 'format' attributes. Id is a unique identifier of the format that is used to link format to dispatchers/receivers. The 'format' attribute is used to specify the format string with special formatter objects, starting with '%' symbol. These special symbols are replaced with context values or special strings when message is written to byte receiver.
To check how formats are linked to dispatchers/receivers, check the 'Formatting' part of this section: Dispatchers-and-receivers
Check the Reference.
Check the Predefined formats section.
If you need to create your own custom formatters, check the custom formatters section.