Skip to content

Commit 4409176

Browse files
authored
Clarify set-facility() function details (#319)
Updated the description and accepted values for the set-facility() rewrite function, clarifying its behavior and expanding the list of named values. Fixes: #177
2 parents 061791e + f0c33df commit 4409176

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ short_title: Setting facility
44
id: adm-temp-facility
55
description: >-
66
It is possible to set the facility field with the set-facility() rewrite
7-
function. When set, the set-facility() rewrite function will only
8-
rewrite the `PRIORITY` field in the message to the first parameter value
9-
specified in the function.
7+
function. The set-facility() rewrite function rewrites only the facility
8+
part of the `PRIORITY` value in the message, while preserving the
9+
severity part.
1010
---
1111

1212
{% include doc/admin-guide/notes/not-valid-param.md %}
@@ -37,10 +37,12 @@ set-facility( "parameter1" );
3737

3838
The set-facility() rewrite function accepts the following values:
3939

40-
- numeric strings: \[0-7\]
40+
- numeric strings: \[0-127\]
4141

42-
- named values: emerg, emergency, panic, alert, crit, critical, err,
43-
error, warning, warn, notice, info, informational, debug
42+
- named values: kern, user, mail, daemon, auth, syslog, lpr, news,
43+
uucp, cron, authpriv, megasafe, ftp, ntp, security, console,
44+
solaris-cron, local0, local1, local2, local3, local4, local5,
45+
local6, local7
4446

4547
### Example usage for the set-facility() rewrite function
4648

@@ -49,7 +51,8 @@ rewrite function.
4951

5052
```config
5153
rewrite {
52-
set-facility("info");
54+
set-facility("mail");
5355
set-facility("6");
54-
set-facility("${.json.severity}");};
56+
set-facility("${.json.facility}");
57+
};
5558
```

0 commit comments

Comments
 (0)