-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestlogging.sh
More file actions
executable file
·28 lines (23 loc) · 884 Bytes
/
testlogging.sh
File metadata and controls
executable file
·28 lines (23 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
# http://shallowsky.com/blog/linux/rsyslog-conf-tutorial.html
# Facilities:
# auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp and local0 through local7
# Priorities:
# debug, info, notice, warning, err, crit, alert, emerg
# Test various facility and priorities
facnum=0
for i in {auth,authpriv,cron,daemon,kern,lpr,mail,mark,news,syslog,user,uucp,local0,local1,local2,local3,local4,local5,local6,local7}
do
facnum=$(($facnum + 1))
prinum=0
for k in {debug,info,notice,warning,err,crit,alert,emerg}
do
prinum=$(($prinum + 1))
logger -p $i.$k "Test daemon message, $facnum - $prinum facility $i priority $k"
done
done
# Test specific syslog filters
logger "UFW"
# Test Logrotate
#/usr/sbin/logrotate -f -v /etc/logrotate.conf