The file driver is one of the most important destination drivers in syslog-ng. It allows to output messages to the specified text file, or to a set of files.
The destination filename may include macros which get expanded when the message is
written, thus a simple file() driver may create several
files. For more information on available macros see Section 8.5, “Macros”.
If the expanded filename refers to a directory which does not exist, it will be
created depending on the create_dirs() setting (both global
and a per destination option).
The file() has a single required parameter that specifies
the filename that stores the log messages. For the list of available optional
parameters, see Section 8.2.1, “file()”.
Declaration:
file(filename options());
![]() |
Note |
|---|---|
When using the |
![]() |
Warning |
|---|---|
|
Since the state of each created file must be tracked by syslog-ng, it consumes
some memory for each file. If no new messages are written to a file within 60
seconds (controlled by the Exploiting this, a DoS attack can be mounted against the system. If the number of possible destination files and its needed memory is more than the amount available on the syslog-ng server. The most suspicious macro is |
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com