When you are editing the syslog-ng configuration file, note the following points:
When writing the names of options and parameters (or other reserved
words), the hyphen (-) and underscore
(_) characters are equivalent, e.g.,
max-connections(10) and
max_connections(10) are both correct.
Number can be prefixed with + or
- to indicate positive or negative values. Numbers
beginning with zero (0) or 0x
are treated as octal or hexadecimal numbers, respectively.
You can use commas (,) to separate options or other
parameters for readability; syslog-ng completely ignores them. The following
declarations are equivalent:
source s_demo_stream {
unix-stream("/dev/log" max-connections(10) group(log)); };
source s_demo_stream {
unix-stream("/dev/log", max-connections(10), group(log)); };
Strings between single quotes ('string') are
treated literally, you do not have to escape special characters. This makes
writing and reading regular expressions much more simple: it is recommended
to use single quotes when writing regular expressions.
When enclosing strings between double-quotes
("string"), you have to escape special characters:
e.g., when enclosing a regular expression that uses the
\ character to escape a special character, you have
to add an extra \ (e.g.,
"\\n"). It is recommended to use single quotes
instead.
Enclosing normal strings between double-quotes
("string") is not necessary, you can just omit the
double-quotes. E.g., when writing filters,
match("sometext") and
match(sometext) will both match for the
sometext string.
When enclosing object IDs (e.g., the name of a destination) between
double-quotes ("mydestination"), the ID can include
whitespace as well, e.g.:
source "s demo stream" {
unix-stream("/dev/log" max-connections(10) group(log)); };
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com