Formatting messages, filenames, directories, and tablenames
The AxoSyslog application can dynamically create filenames, directories, or names of database tables using macros that help you organize your log messages. Macros refer to a property or a part of the log message, for example, the ${HOST}
macro refers to the name or IP address of the client that sent the log message, while ${DAY}
is the day of the month when the message was received. Using these macros in the path of the destination log files allows you for example, to collect the logs of every host into separate files for every day.
A set of macros can be defined as a template object and used in multiple destinations.
Another use of macros and templates is to customize the format of the syslog message, for example, to add elements of the message header to the message text.
-
For details on using templates and macros, see Templates and macros.
-
For a list and description of the macros available in AxoSyslog, see Macros of AxoSyslog.
-
For details on using custom macros created with CSV parsers and pattern databases, see parser: Parse and segment structured messages and Using parser results in filters and templates, respectively.