Skip to content

Commit 13b6a3d

Browse files
authored
Missing macro annotations (#69)
Fixes: #67 Added some missing ${ } around some macro names.
2 parents bcfc068 + c1d47da commit 13b6a3d

File tree

46 files changed

+126
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+126
-126
lines changed

_includes/doc/admin-guide/options/host-override.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
| Type: | string|
44
| Default: ||
55

6-
*Description:* Replaces the ${HOST} part of the message with the
6+
*Description:* Replaces the HOST part of the message with the
77
parameter string.

_includes/doc/admin-guide/options/source-flags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
5656
- *no-hostname*: Enable the no-hostname flag if the log message does
5757
not include the hostname of the sender host. That way {{ site.product.short_name }}
58-
assumes that the first part of the message header is ${PROGRAM}
59-
instead of ${HOST}. For example:
58+
assumes that the first part of the message header is PROGRAM
59+
instead of HOST. For example:
6060
6161
```config
6262
source s_dell {

doc/_admin-guide/020_The_concepts_of_syslog-ng/004_Timezones_and_daylight_saving.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ includes timezone information. That way you do not need to adjust the
8888
recv-time-zone() parameter of syslog-ng.
8989

9090
If you want {{ site.product.short_name }} to output timestamps in Unix (POSIX) time format,
91-
use the `S_UNIXTIME` and `R_UNIXTIME` macros. You do not need to
91+
use the ${S_UNIXTIME} and ${R_UNIXTIME} macros. You do not need to
9292
change any of the timezone related parameters, because the timestamp
9393
information of incoming messages is converted to Unix time internally,
9494
and Unix time is a timezone-independent time representation. (Actually,

doc/_admin-guide/060_Sources/140_Python/001_Python_logmessage_API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ from syslogng import LogMessage
1818
# Initialize an empty message with default values (recvd timestamp, rcptid, hostid, ...)
1919
msg = LogMessage()
2020

21-
# Initialize a message and set its ${MESSAGE} field to the specified argument
21+
# Initialize a message and set its MESSAGE field to the specified argument
2222
msg = LogMessage("string or bytes-like object")
2323
```
2424

doc/_admin-guide/060_Sources/150_snmptrap/000_snmptrap_options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Default value: .snmp. option.
3030
*Description:* The snmptrap() source automatically parses the traps into
3131
name-value pairs, so you can handle the content of the trap as a
3232
structured message. Consequently, you might not even need the
33-
`${MESSAGE}` part of the log message. If set-message-macro() is set to
34-
**no**, {{ site.product.short_name }} leaves the `${MESSAGE}` part empty. If
33+
MESSAGE part of the log message. If set-message-macro() is set to
34+
**no**, {{ site.product.short_name }} leaves the MESSAGE part empty. If
3535
set-message-macro() is set to **yes**, {{ site.product.short_name }} generates a regular
3636
log message from the trap.

doc/_admin-guide/060_Sources/220_unix-stream_unix-dgram/000_Unix_credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ command). Similar information is available for the
1818
| ${.unix.exe} | The path of the executable belonging to the PID that sent the message. For example, /usr/bin/su |
1919
| ${.unix.gid} | The group ID (GID) corresponding to the UID of the application that sent the log message. Note that this is the ID number of the group, not its human-readable name. For example, 0 |
2020
| ${.unix.pid} | The process ID (PID) of the application that sent the log message. For example, 774. |
21-
| | Note that on every UNIX platforms, if the system() source uses sockets, it will overwrite the PID macro with the value of ${.unix.pid}, if it is available. |
21+
| | Note that on every UNIX platforms, if the system() source uses sockets, it will overwrite the ${PID} macro with the value of ${.unix.pid}, if it is available. |
2222
| ${.unix.uid} | The user ID (UID) of the application that sent the log message. Note that this is the ID number of the user, not its human-readable name. For example, 0 |

doc/_admin-guide/070_Destinations/220_Riemann/000_Riemann_options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ destination d_riemann {
128128
*Description:* The numeric value to add as the metric field of the
129129
Riemann event. If possible, include type-hinting as well, otherwise the
130130
Riemann server will interpret the value as a floating-point number. The
131-
following example specifies the SEQNUM macro as an integer.
131+
following example specifies the ${SEQNUM} macro as an integer.
132132

133133
```config
134134
metric(int("${SEQNUM}"))

doc/_admin-guide/070_Destinations/220_Riemann/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ riemann(
2222

2323
### Example: Using the riemann() driver
2424

25-
The following destination sends the value of the SEQNUM macro (the
25+
The following destination sends the value of the ${SEQNUM} macro (the
2626
number of messages sent to this destination) as a metric to the Riemann
2727
server.
2828

doc/_admin-guide/070_Destinations/250_snmp/000_Converting_Cisco_messages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ the Cisco website.
3434
3535
## Parsing Cisco-specific message fields with patterndb
3636
37-
The ${PROGRAM} part of the syslog messages sent by Cisco devices
37+
The PROGRAM part of the syslog messages sent by Cisco devices
3838
contain not only the program name, but other important protocol
39-
information part as well. The ${PROGRAM} of these messages contains the
39+
information part as well. The PROGRAM of these messages contains the
4040
Facility, Severity, and the Mnemonic (the Cisco name) of the message.
4141
The following pattern database parses these values and makes them
4242
available as the .cisco.Facility, .cisco.Severity, and .cisco.MsgName,

doc/_admin-guide/070_Destinations/300_syslog/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ destination d_syslog_tls {
7070
```
7171

7272
**NOTE:** If a message uses the IETF-syslog format (RFC-5424), only the text
73-
of the message can be customized (that is, the ${MESSAGE} part of the
73+
of the message can be customized (that is, the MESSAGE part of the
7474
log), the structure of the header is fixed.
7575
{: .notice--info}

doc/_admin-guide/080_Log/000_Log_paths/003_Log_path_flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ log {
8989

9090
## Example: Using the drop-unmatched flag
9191

92-
In the following example, if a log message arrives whose ${MSG} part does
92+
In the following example, if a log message arrives whose MSG part does
9393
not contain the string foo, then {{ site.product.short_name }} will discard the message
9494
and will not check compliance with the second if condition.
9595

doc/_admin-guide/080_Log/030_Filters/005_Filter_functions/003_inlist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ id: adm-log-filters-inlist
99
in a file, allowing you to do simple, file-based black- and
1010
whitelisting. The file must be a plain-text file, containing one entry
1111
per line. The {{ site.product.short_name }} application loads the entire file, and
12-
compares the value of the specified field (for example, ${PROGRAM}) to
12+
compares the value of the specified field (for example, PROGRAM) to
1313
entries in the file. When you use the in-list() filter, note the
1414
following points:
1515

@@ -25,7 +25,7 @@ Available in {{ site.product.short_name }} 3.5 and later.
2525

2626
## Example: Selecting messages using the in-list() filter
2727

28-
Create a text file that contains the programs (as in the ${PROGRAM}
28+
Create a text file that contains the programs (as in the PROGRAM
2929
field of their log messages) you want to select. For example, you want
3030
to forward only the logs of a few applications from a host: kernel,
3131
sshd, and sudo. Create the /etc/syslog-ng/programlist.list file with the

doc/_admin-guide/080_Log/030_Filters/005_Filter_functions/005_match.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ id: adm-log-filters-match
66
*Synopsis:* match(regexp) \| match(regexp value(\"MACRO\")) \| match(regexp template(\"MACROS\"))
77

88
*Description:* Match a regular expression to the headers and the message
9-
itself (that is, the values returned by the MSGHDR and MSG macros). Note
9+
itself (that is, the values returned by the ${MSGHDR} and ${MSG} macros). Note
1010
that in {{ site.product.short_name }} version 2.1 and earlier, the match() filter was
1111
applied only to the text of the message, excluding the headers. This
1212
functionality has been moved to the message() filter.

doc/_admin-guide/080_Log/030_Filters/005_Filter_functions/006_message.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ id: adm-log-filters-message
66
*Synopsis:* message(regexp)
77

88
*Description:* Match a regular expression to the text of the log
9-
message, excluding the headers (that is, the value returned by the MSG
9+
message, excluding the headers (that is, the value returned by the ${MSG}
1010
macros). Note that in {{ site.product.short_name }} version 2.1 and earlier, this
1111
functionality was performed by the match() filter.

doc/_admin-guide/090_Global_options/000_Global_options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ The following sub-options are available within the stats() option:
431431

432432
Available in {{ site.product.short_name }} 4.1 and later versions.
433433

434-
*Description:* Configures the behavior of counting messages based on different syslog fields, like SEVERITY, FACILITY, ${HOST}.
434+
*Description:* Configures the behavior of counting messages based on different syslog fields, like SEVERITY, FACILITY, HOST.
435435

436436
Possible values:
437437

@@ -510,12 +510,12 @@ restarts with 1).
510510
is generated from the HOSTID and the RCPTID in the format of
511511
HOSTID@RCPTID. It has a fixed length: 16+@+8 characters. You can
512512
include the unique ID in the message by using the macro. For details,
513-
see UNIQID.
513+
see ${UNIQID}.
514514

515515
Enabling this option automatically generates the HOSTID. The HOSTID is a
516516
persistent, 32-bits-long cryptographically secure pseudo random number,
517517
that belongs to the host that the {{ site.product.short_name }} is running on. If the
518518
persist file is damaged, the HOSTID might change.
519519

520-
Enabling this option automatically enables the RCPTID functionality. For
521-
details, see RCPTID
520+
Enabling this option automatically enables the ${RCPTID} functionality. For
521+
details, see ${RCPTID}.

doc/_admin-guide/110_Template_and_rewrite/000_Customize_message_format/000_Formatting_messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ syslog message, for example, to add elements of the message header to
2020
the message text.
2121

2222
**NOTE:** If a message uses the IETF-syslog format (RFC-5424), only the text
23-
of the message can be customized (that is, the ${MESSAGE} part of the
23+
of the message can be customized (that is, the MESSAGE part of the
2424
log), the structure of the header is fixed.
2525
{: .notice--info}
2626

doc/_admin-guide/110_Template_and_rewrite/000_Customize_message_format/002_Date_related_macros.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,52 +33,52 @@ Alternatively, you can modify the timezone of the message using
3333
timezone-specific rewrite rules. For details, see
3434
Rewrite the timezone of a message.
3535
Converting the timezone changes the values of the following date-related
36-
macros (macros MSEC and USEC are not changed):
36+
macros (macros ${MSEC} and ${USEC} are not changed):
3737

38-
- AMPM
38+
- ${AMPM}
3939

40-
- DATE
40+
- ${DATE}
4141

42-
- DAY
42+
- ${DAY}
4343

44-
- FULLDATE
44+
- ${FULLDATE}
4545

46-
- HOUR
46+
- ${HOUR}
4747

48-
- HOUR12
48+
- ${HOUR12}
4949

50-
- ISODATE
50+
- ${ISODATE}
5151

52-
- ISOWEEK
52+
- ${ISOWEEK}
5353

54-
- MIN
54+
- ${MIN}
5555

56-
- MONTH
56+
- ${MONTH}
5757

58-
- MONTH_ABBREV
58+
- ${MONTH_ABBREV}
5959

60-
- MONTH_NAME
60+
- ${MONTH_NAME}
6161

62-
- MONTH_WEEK
62+
- ${MONTH_WEEK}
6363

64-
- SEC
64+
- ${SEC}
6565

66-
- STAMP
66+
- ${STAMP}
6767

68-
- TZ
68+
- ${TZ}
6969

70-
- TZOFFSET
70+
- ${TZOFFSET}
7171

72-
- UNIXTIME
72+
- ${UNIXTIME}
7373

74-
- WEEK
74+
- ${WEEK}
7575

76-
- WEEK_DAY
76+
- ${WEEK_DAY}
7777

78-
- WEEK_DAY_ABBREV
78+
- ${WEEK_DAY_ABBREV}
7979

80-
- WEEK_DAY_NAME
80+
- ${WEEK_DAY_NAME}
8181

82-
- YEAR
82+
- ${YEAR}
8383

84-
- YEAR_DAY
84+
- ${YEAR_DAY}

doc/_admin-guide/110_Template_and_rewrite/000_Customize_message_format/003_Hard_vs_soft_macros.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ However, it is not possible to change the values of hard macros in
1919
rewrite rules or via any other means.
2020

2121
The following macros in {{ site.product.short_name }} are hard macros and cannot be
22-
modified: BSDTAG, CONTEXT\_ID, DATE, DAY, FACILITY\_NUM, FACILITY,
23-
FULLDATE, HOUR, ISODATE, ISOWEEK, LEVEL\_NUM, LEVEL, MIN, MONTH\_ABBREV,
24-
MONTH\_NAME, MONTH, MONTH\_WEEK, PRIORITY, PRI, RCPTID, SDATA, SEC,
25-
SEQNUM, SOURCEIP, STAMP, TAG, TAGS, TZOFFSET, TZ, UNIXTIME,
26-
WEEK\_DAY\_ABBREV, WEEK\_DAY\_NAME, WEEK\_DAY, WEEK, YEAR\_DAY, YEAR.
22+
modified: ${BSDTAG}, ${CONTEXT_ID}, ${DATE}, ${DAY}, ${FACILITY_NUM}, ${FACILITY},
23+
${FULLDATE}, ${HOUR}, ${ISODATE}, ${ISOWEEK}, ${LEVEL_NUM}, ${LEVEL}, ${MIN}, ${MONTH_ABBREV},
24+
${MONTH_NAME}, ${MONTH}, ${MONTH_WEEK}, ${PRIORITY}, ${PRI}, ${RCPTID}, ${SDATA}, ${SEC},
25+
${SEQNUM}, ${SOURCEIP}, ${STAMP}, ${TAG}, ${TAGS}, ${TZOFFSET}, ${TZ}, ${UNIXTIME},
26+
${WEEK_DAY_ABBREV}, ${WEEK_DAY_NAME}, ${WEEK_DAY}, ${WEEK}, ${YEAR_DAY}, ${YEAR}.
2727

28-
The following macros can be modified:FULLHOST\_FROM, FULLHOST,
29-
HOST\_FROM, HOST, LEGACY\_MSGHDR, MESSAGE, MSG,MSGID, MSGONLY, PID,
30-
PROGRAM, SOURCE. Custom values created using rewrite rules or parsers
28+
The following macros can be modified: ${FULLHOST_FROM}, ${FULLHOST},
29+
${HOST_FROM}, ${HOST}, ${LEGACY_MSGHDR}, ${MESSAGE}, ${MSG}, ${MSGID}, ${MSGONLY}, ${PID},
30+
${PROGRAM}, ${SOURCE}. Custom values created using rewrite rules or parsers
3131
can be modified as well, just like stored matches of regular expressions
3232
($0 \... $255).
3333

doc/_admin-guide/110_Template_and_rewrite/000_Customize_message_format/004_Macros_of_syslog-ng.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: >-
1313
>
1414
> If you are using the flags(no-parse) option, then syslog message parsing is
1515
> completely disabled, and the entire incoming message is treated as
16-
> the ${MESSAGE} part of a syslog message.
16+
> the MESSAGE part of a syslog message.
1717
> In this case, {{ site.product.short_name }} generates a new syslog header
1818
> (timestamp, host, and so on) automatically. Note that even
1919
> though flags(no-parse) disables message parsing, some flags can
@@ -64,15 +64,15 @@ When used, the output specifies the local IP address of the
6464
source from which the message originates.
6565

6666
For an example use case when using the macro is recommended, see
67-
[[Example use case: using the ${DESTIP}, the ${DESTPORT}, and the ${PROTO} macros]]
67+
Example use case: using the ${DESTIP}, the ${DESTPORT}, and the ${PROTO} macros
6868

6969
## ${DESTPORT}
7070

7171
When used, the output specifies the local port of the
7272
source from which the message originates.
7373

7474
For an example use case when using the macro is recommended, see
75-
[[Example use case: using the ${DESTIP}, the ${DESTPORT}, and the ${PROTO} macros]].
75+
Example use case: using the ${DESTIP}, the ${DESTPORT}, and the ${PROTO} macros.
7676

7777
## ${FACILITY}
7878

@@ -152,8 +152,8 @@ Available in 3.24 and later.
152152

153153
The priority (also called severity) of the message,
154154
represented as a numeric value, for example, 3. For the textual
155-
representation of this value, use the ${LEVEL} macro. See PRIORITY or
156-
LEVEL for details.
155+
representation of this value, use the ${LEVEL} macro. See ${PRIORITY} or
156+
${LEVEL} for details.
157157

158158
## ${LOGHOST}
159159

@@ -170,11 +170,11 @@ The hostname of the computer running {{ site.product.short_name }}.
170170

171171
Text contents of the log message without the program name
172172
and pid. The program name and the pid together are available in the
173-
MSGHDR and ${PID} macros.
173+
${MSGHDR} and ${PID} macros.
174174

175175
If you are using the flags(no-parse) option, then syslog message parsing
176176
is completely disabled, and the entire incoming message is treated as
177-
the ${MESSAGE} part of a syslog message. In this case, {{ site.product.short_name }}
177+
the MESSAGE part of a syslog message. In this case, {{ site.product.short_name }}
178178
generates a new syslog header (timestamp, host, and so on)
179179
automatically. Note that even though flags(no-parse) disables message
180180
parsing, some flags can still be used, for example, the no-multi-line
@@ -372,7 +372,7 @@ one of the following:
372372
IETF-syslog protocol (**${.SDATA.meta.sequenceId}**), and can
373373
be added to BSD-syslog messages using the **${SEQNUM}** macro.
374374

375-
**NOTE:** If you need a sequence number for every log message that {{ site.product.short_name }} receives, use the RCPTID macro.
375+
**NOTE:** If you need a sequence number for every log message that {{ site.product.short_name }} receives, use the ${RCPTID} macro.
376376
{: .notice--info}
377377

378378
## ${SOURCE}
@@ -494,8 +494,8 @@ The day of the week as a numerical value (1-7).
494494

495495
## ${WEEKDAY}, ${C_WEEKDAY}, ${R_WEEKDAY}, ${S_WEEKDAY}
496496

497-
These macros are deprecated, use WEEK_DAY_ABBREV, R_WEEK_DAY_ABBREV,
498-
S_WEEK_DAY_ABBREV instead. The 3-letter name of the day of week the
497+
These macros are deprecated, use ${WEEK_DAY_ABBREV}, ${R_WEEK_DAY_ABBREV},
498+
${S_WEEK_DAY_ABBREV} instead. The 3-letter name of the day of week the
499499
message was sent, for example, Thu.
500500

501501
## ${WEEK_DAY_NAME}, ${C_WEEK_DAY_NAME}, ${R_WEEK_DAY_NAME}, ${S_WEEK_DAY_NAME}

doc/_admin-guide/110_Template_and_rewrite/001_Modifying_messages/000_Replace.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ To replace a part of the log message, you have to:
1212

1313
- select the field of the message that the rewrite rule should process
1414

15-
Substitution rules can operate on any soft macros, for example, MESSAGE,
16-
PROGRAM, or any user-defined macros created using parsers. You can also
15+
Substitution rules can operate on any soft macros, for example, ${MESSAGE},
16+
${PROGRAM}, or any user-defined macros created using parsers. You can also
1717
rewrite the structured-data fields of messages complying to the RFC-5424
1818
(IETF-syslog) message format.
1919

doc/_admin-guide/110_Template_and_rewrite/001_Modifying_messages/003_Setting_facility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ id: adm-temp-facility
55
description: >-
66
It is possible to set the facility field with the set-facility() rewrite
77
function. When set, the set-facility() rewrite function will only
8-
rewrite the ${PRIORITY} field in the message to the first parameter value
8+
rewrite the PRIORITY field in the message to the first parameter value
99
specified in the function.
1010
---
1111

doc/_admin-guide/110_Template_and_rewrite/001_Modifying_messages/008_Custom_SDATA_fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ rewrite r_rewrite_set {
4646
```
4747

4848
If you use the **${[email protected]}** macro in a
49-
template or SQL table, its value will be that of the SOURCEIP macro (as
49+
template or SQL table, its value will be that of the ${SOURCEIP} macro (as
5050
seen on the machine where the SDATA field was created) for every message
5151
that was processed with this rewrite rule, and empty for every other
5252
message.

doc/_admin-guide/120_Parser/000_Parsing_syslog_messages/000_Syslog_parser_options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ If you set drop-invalid() to **no**, the parsing error triggers
2424
syslog-parser() to rewrite and extend the original log message with the
2525
following additional information:
2626

27-
- It prepends the following message to the contents of the ${MESSAGE}
27+
- It prepends the following message to the contents of the MESSAGE
2828
field: Error processing log message.
2929

30-
- It sets the contents of the ${PROGRAM} field to syslog-ng.
30+
- It sets the contents of the PROGRAM field to syslog-ng.
3131

3232
- It sets the contents of the facility field to syslog.
3333

doc/_admin-guide/120_Parser/002_Parsing_key-value_pairs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ are not permitted.
3636

3737
To parse key=value pairs, define a parser that has the kv-parser()
3838
option. Defining the prefix is optional. By default, the parser will
39-
process the ${MESSAGE} part of the log message. You can also define the
39+
process the MESSAGE part of the log message. You can also define the
4040
parser inline in the log path.
4141

4242
**Declaration**

0 commit comments

Comments
 (0)