version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SYSLOG-FACILITY |
|
|
2 |
!!!SYSLOG-FACILITY |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
BUGS |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
syslog-facility - Setup and remove LOCALx facility for sysklogd |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__syslog-facility set__ ''set_of_priority log_file'' |
|
|
17 |
... |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__syslog-facility remove__ ''facility'' |
|
|
21 |
!!DESCRIPTION |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
__syslog-facility__ can be used to setup a syslog |
|
|
25 |
facility and to remove it. The primary use of this perl |
|
|
26 |
script is to allow packages to automatically setup (and |
|
|
27 |
remove) a LOCALx facility. With the first argument beeing |
|
|
28 |
''set'', it will output a string containing the first |
|
|
29 |
free LOCALx facility that has been assigned to your request |
|
|
30 |
: |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
# syslog-facility set all /var/log/sympa |
|
|
34 |
local0 |
|
|
35 |
This does mean that a line ``local0.* /var/log/sympa'' has been added to the syslog.conf file. If no free LOCALx facility has been found, then it outputs ``none'' (with a end of line). |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
You can use different set of priorities (most of what |
|
|
39 |
syslogd supports) : |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
# syslog-facility set 'all;!=debug;' /var/log/sympa '=debug' /var/log/sympa-d |
|
|
43 |
local1 |
|
|
44 |
Pay particular attention to shell escapes since ';','!' have special meanings for them. The syntax is similar to syslog.conf except that '*' must be replaced by 'all'. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
In that case you will have two lines added two the |
|
|
48 |
syslog.conf file : |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
local1.*;local1.!=debug /var/log/sympa |
|
|
52 |
local1.=debug /var/log/sympa-d |
|
|
53 |
If the first argument is ''remove'', then it will remove all references to a precise LOCALx facility. Example : |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
# syslog-facility remove local1 |
|
|
57 |
It will remove all references to the local1 facility. |
|
|
58 |
!!BUGS |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
The script doesn't know about multi-lines configuration (ie |
|
|
62 |
with ''). |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
With a line like that ``mail,local0.* /anything'', |
|
|
66 |
``syslog-facility remove local0'' would remove the entire |
|
|
67 |
line. It should not be a problem since lines installed by |
|
|
68 |
this script cannot use this syntax. |
|
|
69 |
!!SEE ALSO |
|
|
70 |
|
|
|
71 |
|
2 |
perry |
72 |
syslog.conf(5), sysklogd(8). |
1 |
perry |
73 |
---- |