Add an action to log messages to a file
You can add an action to log messages to a file in the file format you select. By logging messages to a file, you can archive received logs for compliance with, for example, internal security or regulatory requirements.
- From the Kiwi Syslog NG navigation bar, choose Setup > Rules.
- Locate an existing rule. If the rule does not exist, add a rule and start the New Rule wizard.
- If you are adding an action to an existing rule, select the rule and click Edit. If you are creating a new rule, navigate to the Actions step of the New Rule wizard.
- Click Add Action. Define the action name in the provided field.
-
In the Action drop down, select Log to a file.
-
Specify the following options:
Path and file name of log file Enter a path and file name, or browse to select a file. The default file location is
<installPath>\Logs\SyslogCatchAll-$Message.DateISO.txt
.To split incoming messages into multiple files, insert an AutoSplit value in the path or file name.
For example, the current date variable$Message.Date
is inserted in the default file name. This appends the date to the file name, so a new message log file is created for each day.To select a value:
- Place your cursor in the path or file name at the location you want to insert the AutoSplit value.
- Click the
icon on the right and select the value.
Log file format Specify the file format. You can select a standard format or create a custom format. Custom formats are listed at the end of the Log file format menu, after the standard and reserved formats.
- Check Enable Log File Rotation to enable automated log file rotation.
- If you are adding an action to an existing rule, click Apply. If you are creating an action in the New Rule wizard, click Add.