Skip to content

Commit bdb3b55

Browse files
committed
multiline_options: Split up, even more, the multiline option sections, corrected scope info of multi-line-timeout(), added the description of the new empty-line-separated multi-line-mode()
Signed-off-by: Hofi <hofione@gmail.com>
1 parent beb435e commit bdb3b55

12 files changed

+42
-20
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
>**TIP:** To format multi-line messages to your individual needs, consider
22
>the following:
3-
>
3+
>
44
>- To make multi-line messages more readable when written to a file,
55
> use a template in the destination and instead of the ${MESSAGE}
66
> macro, use the following: **$(indent-multi-line ${MESSAGE})**.
@@ -14,12 +14,6 @@
1414
> template("${ISODATE} ${HOST} $(indent-multi-line ${MESSAGE})\n")
1515
> );
1616
> };
17-
> ```
18-
>
17+
> ```
18+
>For details on using templates, see Templates and macros.
1919
{: .notice--info}
20-
21-
For details on using templates, see Templates and macros.
22-
23-
- To actually convert the lines of multi-line messages to single line
24-
(by replacing the newline characters with whitespaces), use the
25-
**flags(no-multi-line)** option in the source.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- The *empty-line-separated* mode, as its name suggests, reads and treats all messages as one till it receives an empty line (which contains only a \r, \n or \r\n sequence).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
>**TIP:** To actually convert the lines of multi-line messages to single line (by replacing the newline characters with whitespaces), use the **flags(no-multi-line)** option in the source.
2+
{: .notice--info}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## multi-line-mode()
2+
3+
| Type: | indented \| regexp \| empty-line-separated |
4+
|Default: | empty string|
5+
6+
*Description:* Use the multi-line-mode() option when processing
7+
multi-line messages. The {{ site.product.short_name }} application provides the
8+
following methods to process multi-line messages:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## multi-line-mode()
2+
3+
| Type: | empty-line-separated |
4+
|Default: | empty string|
5+
6+
*Description:* Use the multi-line-mode() option when processing
7+
multi-line messages. For this source the {{ site.product.short_name }} application provides only the
8+
`empty-line-separated` following method currently to process multi-line messages:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% include doc/admin-guide/options/multi-line-mode-network-header.md %}
2+
3+
{% include doc/admin-guide/options/multi-line-mode-empty-line-separated.md %}
4+
5+
{% include doc/admin-guide/options/multi-line-mode-footer.md %}

_includes/doc/admin-guide/options/multi-line-mode.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
## multi-line-mode()
2-
3-
| Type: | indented \| regexp|
4-
|Default: | empty string|
5-
6-
*Description:* Use the multi-line-mode() option when processing
7-
multi-line messages. The {{ site.product.short_name }} application provides the
8-
following methods to process multi-line messages:
1+
{% include doc/admin-guide/options/multi-line-mode-header.md %}
92

103
- The *indented* mode can process messages where each line that
114
belongs to the previous line is indented by whitespace, and the
@@ -29,7 +22,7 @@ following methods to process multi-line messages:
2922
multi-line-mode(prefix-garbage), see the multi-line-prefix() and
3023
multi-line-garbage() options.
3124
32-
- The prefix-suffix mode uses a string or regular expression (set in
25+
- The *prefix-suffix* mode uses a string or regular expression (set in
3326
multi-line-prefix()) that matches the beginning of the log messages,
3427
ignores newline characters from the source until a line matches the
3528
regular expression set in multi-line-suffix(), and treats the lines
@@ -43,4 +36,8 @@ following methods to process multi-line messages:
4336
The prefix-suffix mode is similar to the prefix-garbage mode, but it
4437
appends the garbage part to the message instead of discarding it.
4538
39+
{% include doc/admin-guide/options/multi-line-mode-empty-line-separated.md %}
40+
4641
{% include doc/admin-guide/examples/multi-line.md %}
42+
43+
{% include doc/admin-guide/options/multi-line-mode-footer.md %}

_includes/doc/admin-guide/options/multi-line-prefix.md

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ multi-line messages. If the multi-line-prefix() option is set, {{ site.product.s
1313
regular expression again, and treats the lines between the matching
1414
lines as a single message. See also the multi-line-garbage() option.
1515

16-
{% include doc/admin-guide/examples/multi-line.md %}
17-
1816
### Example: Processing Tomcat logs
1917

2018
The log messages of the Apache Tomcat server are a typical example for

_includes/doc/admin-guide/options/multi-line-timeout.md

+3
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ source s_multi {
2323
```
2424

2525
For more details see the blog post Multi-line-timeout: making sure your last multi-line message is not lost.
26+
27+
>**NOTE:** This option has effect only if the file follow mode is `syslog-ng poll`, `follow-freq()` > 0. For details of file follow modes, refer to How content changes are followed in file() and wildcard-file() sources.
28+
{: .notice--info}

doc/_admin-guide/060_Sources/005_Default-network-drivers/000_Default-network-drivers_options.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The default-network-drivers() source has the following options.
1818

1919
{% include doc/admin-guide/options/max-connections.md %}
2020

21+
{% include doc/admin-guide/options/multi-line-mode-network.md %}
22+
2123
## rfc5424-tcp-port()
2224

2325
| Type:| number|

doc/_admin-guide/060_Sources/070_Network/000_Network_source_options.md

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Available in 3.19 and later.
5353

5454
{% include doc/admin-guide/options/max-connections.md %}
5555

56+
{% include doc/admin-guide/options/multi-line-mode-network.md %}
57+
5658
{% include doc/admin-guide/options/pad-size.md %}
5759

5860
{% include doc/admin-guide/options/port-localport.md %}

doc/_admin-guide/060_Sources/170_Syslog/000_syslog_source_options.md

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Available in 3.19 and later.
5353

5454
{% include doc/admin-guide/options/max-connections.md %}
5555

56+
{% include doc/admin-guide/options/multi-line-mode-network.md %}
57+
5658
{% include doc/admin-guide/options/pad-size.md %}
5759

5860
{% include doc/admin-guide/options/port-localport.md %}

0 commit comments

Comments
 (0)