Skip to content

multi-line changes #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions _includes/doc/admin-guide/examples/multi-line.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
>**TIP:** To format multi-line messages to your individual needs, consider
>the following:
>
>
>- To make multi-line messages more readable when written to a file,
> use a template in the destination and instead of the ${MESSAGE}
> macro, use the following: **$(indent-multi-line ${MESSAGE})**.
Expand All @@ -14,12 +14,6 @@
> template("${ISODATE} ${HOST} $(indent-multi-line ${MESSAGE})\n")
> );
> };
> ```
>
> ```
>For details on using templates, see Templates and macros.
{: .notice--info}

For details on using templates, see Templates and macros.

- 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.
Original file line number Diff line number Diff line change
@@ -0,0 +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).
2 changes: 2 additions & 0 deletions _includes/doc/admin-guide/options/multi-line-mode-footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>**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.
{: .notice--info}
8 changes: 8 additions & 0 deletions _includes/doc/admin-guide/options/multi-line-mode-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## multi-line-mode()

| Type: | indented \| regexp \| empty-line-separated |
|Default: | empty string|

*Description:* Use the multi-line-mode() option when processing
multi-line messages. The {{ site.product.short_name }} application provides the
following methods to process multi-line messages:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## multi-line-mode()

| Type: | empty-line-separated |
|Default: | empty string|

*Description:* Use the multi-line-mode() option when processing
multi-line messages. For this source the {{ site.product.short_name }} application provides only the
`empty-line-separated` following method currently to process multi-line messages:
5 changes: 5 additions & 0 deletions _includes/doc/admin-guide/options/multi-line-mode-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% include doc/admin-guide/options/multi-line-mode-network-header.md %}

{% include doc/admin-guide/options/multi-line-mode-empty-line-separated.md %}

{% include doc/admin-guide/options/multi-line-mode-footer.md %}
15 changes: 6 additions & 9 deletions _includes/doc/admin-guide/options/multi-line-mode.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
## multi-line-mode()

| Type: | indented \| regexp|
|Default: | empty string|

*Description:* Use the multi-line-mode() option when processing
multi-line messages. The {{ site.product.short_name }} application provides the
following methods to process multi-line messages:
{% include doc/admin-guide/options/multi-line-mode-header.md %}

- The *indented* mode can process messages where each line that
belongs to the previous line is indented by whitespace, and the
Expand All @@ -29,7 +22,7 @@ following methods to process multi-line messages:
multi-line-mode(prefix-garbage), see the multi-line-prefix() and
multi-line-garbage() options.

- The prefix-suffix mode uses a string or regular expression (set in
- The *prefix-suffix* mode uses a string or regular expression (set in
multi-line-prefix()) that matches the beginning of the log messages,
ignores newline characters from the source until a line matches the
regular expression set in multi-line-suffix(), and treats the lines
Expand All @@ -43,4 +36,8 @@ following methods to process multi-line messages:
The prefix-suffix mode is similar to the prefix-garbage mode, but it
appends the garbage part to the message instead of discarding it.

{% include doc/admin-guide/options/multi-line-mode-empty-line-separated.md %}

{% include doc/admin-guide/examples/multi-line.md %}

{% include doc/admin-guide/options/multi-line-mode-footer.md %}
2 changes: 0 additions & 2 deletions _includes/doc/admin-guide/options/multi-line-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ multi-line messages. If the multi-line-prefix() option is set, {{ site.product.s
regular expression again, and treats the lines between the matching
lines as a single message. See also the multi-line-garbage() option.

{% include doc/admin-guide/examples/multi-line.md %}

### Example: Processing Tomcat logs

The log messages of the Apache Tomcat server are a typical example for
Expand Down
3 changes: 3 additions & 0 deletions _includes/doc/admin-guide/options/multi-line-timeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ source s_multi {
```

For more details see the blog post Multi-line-timeout: making sure your last multi-line message is not lost.

>**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.
{: .notice--info}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The default-network-drivers() source has the following options.

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

{% include doc/admin-guide/options/multi-line-mode-network.md %}

## rfc5424-tcp-port()

| Type:| number|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Available in 3.19 and later.

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

{% include doc/admin-guide/options/multi-line-mode-network.md %}

{% include doc/admin-guide/options/pad-size.md %}

{% include doc/admin-guide/options/port-localport.md %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Available in 3.19 and later.

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

{% include doc/admin-guide/options/multi-line-mode-network.md %}

{% include doc/admin-guide/options/pad-size.md %}

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