forked from cihub/seelog
-
Notifications
You must be signed in to change notification settings - Fork 13
Formatting
dmitrybond edited this page Jul 2, 2012
·
10 revisions
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 'verbs', starting with '%' symbol. These verbs 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.