3 p Check different log thresholds
4 $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
5 > [ 0.000000] [0:maestro@] Test with the settings ''
6 > [ 0.000000] [0:maestro@] val=2
7 > [ 0.000000] [0:maestro@] false alarm!
8 > [ 0.000000] [0:maestro@] Test with the settings ' '
9 > [ 0.000000] [0:maestro@] val=2
10 > [ 0.000000] [0:maestro@] false alarm!
11 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info '
12 > [ 0.000000] [0:maestro@] val=2
13 > [ 0.000000] [0:maestro@] false alarm!
14 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
15 > [ 0.000000] [0:maestro@] val=1
16 > [ 0.000000] [0:maestro@] val=2
17 > [ 0.000000] [0:maestro@] false alarm!
18 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
19 > [ 0.000000] [0:maestro@] val=2
20 > [ 0.000000] [0:maestro@] false alarm!
21 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
22 > [ 0.000000] [0:maestro@] false alarm!
24 p Check the "file" log appender
25 $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:file:${bindir:=.}/log_usage.log
26 $ cat ${bindir:=.}/log_usage.log
27 > [ 0.000000] [0:maestro@] Test with the settings ''
28 > [ 0.000000] [0:maestro@] val=2
29 > [ 0.000000] [0:maestro@] false alarm!
30 > [ 0.000000] [0:maestro@] Test with the settings ' '
31 > [ 0.000000] [0:maestro@] val=2
32 > [ 0.000000] [0:maestro@] false alarm!
33 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info '
34 > [ 0.000000] [0:maestro@] val=2
35 > [ 0.000000] [0:maestro@] false alarm!
36 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
37 > [ 0.000000] [0:maestro@] val=1
38 > [ 0.000000] [0:maestro@] val=2
39 > [ 0.000000] [0:maestro@] false alarm!
40 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
41 > [ 0.000000] [0:maestro@] val=2
42 > [ 0.000000] [0:maestro@] false alarm!
43 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
44 > [ 0.000000] [0:maestro@] false alarm!
46 p Check the "rollfile" log appender
47 $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:rollfile:500:${bindir:=.}/log_usage.log
48 $ cat ${bindir:=.}/log_usage.log
49 > [ 0.000000] [0:maestro@] val=2
50 > [ 0.000000] [0:maestro@] false alarm!
51 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
52 > [ 0.000000] [0:maestro@] val=2
53 > [ 0.000000] [0:maestro@] false alarm!
54 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
55 > [ 0.000000] [0:maestro@] false alarm!
59 > [ 0.000000] [0:maestro@] false alarm!
60 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
61 > [ 0.000000] [0:maestro@] val=1
65 p Check the "splitfile" log appender
66 $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:splitfile:500:${bindir:=.}/log_usage_%.log
67 $ cat ${bindir:=.}/log_usage_0.log
68 > [ 0.000000] [0:maestro@] Test with the settings ''
69 > [ 0.000000] [0:maestro@] val=2
70 > [ 0.000000] [0:maestro@] false alarm!
71 > [ 0.000000] [0:maestro@] Test with the settings ' '
72 > [ 0.000000] [0:maestro@] val=2
73 > [ 0.000000] [0:maestro@] false alarm!
74 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info '
75 > [ 0.000000] [0:maestro@] val=2
76 > [ 0.000000] [0:maestro@] false alarm!
77 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
78 > [ 0.000000] [0:maestro@] val=1
80 $ cat ${bindir:=.}/log_usage_1.log
81 > [ 0.000000] [0:maestro@] val=2
82 > [ 0.000000] [0:maestro@] false alarm!
83 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
84 > [ 0.000000] [0:maestro@] val=2
85 > [ 0.000000] [0:maestro@] false alarm!
86 > [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
87 > [ 0.000000] [0:maestro@] false alarm!
89 $ rm -f ${bindir:=.}/log_usage.log ${bindir:=.}/log_usage_0.log ${bindir:=.}/log_usage_1.log
91 # Would be nice for code coverage, but the early exit leads to lots of memory leaks
93 #$ $SG_TEST_EXENV ${bindir:=.}/log_usage --help --help-log-categories