-
Notifications
You must be signed in to change notification settings - Fork 13
Receiver reference
Function: writes received messages to a file
Element name: file
Allowed attributes:
- formatid - format that will be used by this receiver
- path - path to the log file
Example:
<sealog>
<outputs>
<file path="log.log"/>
</outputs>
</sealog>
Function: writes received messages to std out
Element name: console
Allowed attributes:
- formatid - format that will be used by this receiver
Example:
<sealog>
<outputs>
<console/>
</outputs>
</sealog>
Function: writes received messages to a file, until date changes or file exceeds a specified limit. After that the current log file is renamed and writer starts to log into a new file. You can set a limit for such renamed files count, if you want, and then the rolling writer would delete older ones when the files count exceed the specified limit.
Element name: rollingfile
Allowed attributes:
-
formatid - format that will be used by this receiver
-
filename - path to the log file. On creation, this path is split into folder path and actual file name. The latter will be used as a common part for all files, that act in rolling:
- In case of 'date' rolling, the file names will be formed this way:
time.LocalTime().Format(rollFileWriter.datePattern)+" "+rollFileWriter.fileName)
- In case of 'size' rolling, the file names will be formed this way: "filename.roll#". For example: app.log, app.log.1, app.log.2, app.log.3, ...
-
type - rotation type: by date or by size
Example:
<sealog>
<outputs>
<file path="log.log"/>
</outputs>
</sealog>