Skip to content

Commit 2cdd0b2

Browse files
Documentation for the new filter severity settings (#107)
Also unifies documentation with facility filter and rewrite-rules.
2 parents 49339f6 + 92cd7c9 commit 2cdd0b2

File tree

5 files changed

+32
-13
lines changed

5 files changed

+32
-13
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
| Numerical Value | Equivalent Named Values |
3+
|----------------:|-------------------------|
4+
| 0 | emergency, emerg, panic |
5+
| 1 | alert |
6+
| 2 | critical, crit |
7+
| 3 | error, err |
8+
| 4 | warning, warn |
9+
| 5 | notice |
10+
| 6 | informational, info |
11+
| 7 | debug |
12+
13+
Both numerical and named values are equally valid
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
![]({{ site.baseurl}}/assets/images/caution.png) **CAUTION:**
3+
The `..` notation can only be used with named values. Using it with numerical values is not supported.
4+
{: .notice--warning}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ You can use the facility filter the following ways:
1818

1919
- Use a single facility code, for example, **facility(1)**
2020

21-
- Use a facility range (works only with facility names), for example,
21+
- Use a facility range, for example,
2222
**facility(local0..local5)**
2323

24+
{% include doc/admin-guide/warnings/dotdot-stringonly.md %}
25+
2426
The {{ site.product.short_name }} application recognizes the following facilities: (Note
2527
that some of these facilities are available only on specific platforms.)
2628

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ every message of error or higher level, use the following filter:
2121
```config
2222
level(err..emerg)
2323
```
24+
{% include doc/admin-guide/warnings/dotdot-stringonly.md %}
2425

25-
The [[level() filter|adm-log-filters-level]] accepts the following levels: emerg, alert, crit,
26-
err, warning, notice, info, debug.
26+
The [[level() filter|adm-log-filters-level]] accepts the following levels:
27+
28+
{% include doc/admin-guide/options/filter-severity.md %}

doc/_admin-guide/110_Template_and_rewrite/001_Modifying_messages/002_Setting_severity.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Setting severity with the set-severity() rewrite function
2+
title: Setting severity with the [[set-severity()|adm-temp-severity]] rewrite function
33
short_title: Setting severity
44
id: adm-temp-severity
55
description: >-
6-
It is possible to configure the severity field with the set-severity()
7-
rewrite function. When configured, the set-severity() rewrite function
6+
It is possible to configure the severity field with the [[set-severity()|adm-temp-severity]]
7+
rewrite function. When configured, the [[set-severity()|adm-temp-severity]] rewrite function
88
will only rewrite the ${SEVERITY} field in the message to the first
99
parameter value specified in the function.
1010
---
@@ -21,7 +21,7 @@ rewrite <name_of_the_rule> {
2121

2222
## Parameters
2323

24-
The set-severity() rewrite function has a single, mandatory parameter
24+
The [[set-severity()|adm-temp-severity]] rewrite function has a single, mandatory parameter
2525
that can be defined as follows:
2626

2727
```config
@@ -30,12 +30,9 @@ set-severity( "parameter1" );
3030

3131
## Accepted values
3232

33-
The set-severity() rewrite function accepts the following values:
33+
The [[set-severity()|adm-temp-severity]] rewrite function accepts the following values:
3434

35-
- numeric strings: \[0-7\]
36-
37-
- named values: emerg, emergency, panic, alert, crit, critical, err,
38-
error, warning, warn, notice, info, informational, debug
35+
{% include doc/admin-guide/options/filter-severity.md %}
3936

4037
### Example usage for the set-severity() rewrite function
4138

@@ -54,7 +51,7 @@ rewrite {
5451

5552
```config
5653
rewrite {
57-
set-severity("6");
54+
set-severity(6);
5855
};
5956
```
6057

@@ -65,3 +62,4 @@ rewrite {
6562
set-severity("${.json.severity}");
6663
};
6764
```
65+
{% include doc/admin-guide/warnings/dotdot-stringonly.md %}

0 commit comments

Comments
 (0)