|
@@ -35,44 +35,44 @@ passfail() {
|
|
|
|
|
|
echo -n "1. runInitTest default parameters:"
|
|
|
cat > $tempfile << .
|
|
|
-FATAL [example] MSG_WRITERR, error writing to test1: 42
|
|
|
-ERROR [example] MSG_RDLOCMES, reading local message file dummy/file
|
|
|
-WARN [example] MSG_BADSTREAM, bad log console output stream: example
|
|
|
-WARN [example.alpha] MSG_READERR, error reading from message file a.txt: dummy reason
|
|
|
-INFO [example.alpha] MSG_OPENIN, unable to open message file example.msg for input: dummy reason
|
|
|
-FATAL [example.beta] MSG_BADSEVERITY, unrecognized log severity: beta_fatal
|
|
|
-ERROR [example.beta] MSG_BADDESTINATION, unrecognized log destination: beta_error
|
|
|
-WARN [example.beta] MSG_BADSTREAM, bad log console output stream: beta_warn
|
|
|
-INFO [example.beta] MSG_READERR, error reading from message file beta: info
|
|
|
+FATAL [example] MSG_WRITERR error writing to test1: 42
|
|
|
+ERROR [example] MSG_RDLOCMES reading local message file dummy/file
|
|
|
+WARN [example] MSG_BADSTREAM bad log console output stream: example
|
|
|
+WARN [example.alpha] MSG_READERR error reading from message file a.txt: dummy reason
|
|
|
+INFO [example.alpha] MSG_OPENIN unable to open message file example.msg for input: dummy reason
|
|
|
+FATAL [example.beta] MSG_BADSEVERITY unrecognized log severity: beta_fatal
|
|
|
+ERROR [example.beta] MSG_BADDESTINATION unrecognized log destination: beta_error
|
|
|
+WARN [example.beta] MSG_BADSTREAM bad log console output stream: beta_warn
|
|
|
+INFO [example.beta] MSG_READERR error reading from message file beta: info
|
|
|
.
|
|
|
./logger_example -c stdout | cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
|
echo -n "2. Severity filter:"
|
|
|
cat > $tempfile << .
|
|
|
-FATAL [example] MSG_WRITERR, error writing to test1: 42
|
|
|
-ERROR [example] MSG_RDLOCMES, reading local message file dummy/file
|
|
|
-FATAL [example.beta] MSG_BADSEVERITY, unrecognized log severity: beta_fatal
|
|
|
-ERROR [example.beta] MSG_BADDESTINATION, unrecognized log destination: beta_error
|
|
|
+FATAL [example] MSG_WRITERR error writing to test1: 42
|
|
|
+ERROR [example] MSG_RDLOCMES reading local message file dummy/file
|
|
|
+FATAL [example.beta] MSG_BADSEVERITY unrecognized log severity: beta_fatal
|
|
|
+ERROR [example.beta] MSG_BADDESTINATION unrecognized log destination: beta_error
|
|
|
.
|
|
|
./logger_example -c stdout -s error | cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
|
echo -n "3. Debug level:"
|
|
|
cat > $tempfile << .
|
|
|
-FATAL [example] MSG_WRITERR, error writing to test1: 42
|
|
|
-ERROR [example] MSG_RDLOCMES, reading local message file dummy/file
|
|
|
-WARN [example] MSG_BADSTREAM, bad log console output stream: example
|
|
|
-WARN [example.alpha] MSG_READERR, error reading from message file a.txt: dummy reason
|
|
|
-INFO [example.alpha] MSG_OPENIN, unable to open message file example.msg for input: dummy reason
|
|
|
-DEBUG [example] MSG_RDLOCMES, reading local message file example/0
|
|
|
-DEBUG [example] MSG_RDLOCMES, reading local message file example/24
|
|
|
-DEBUG [example] MSG_RDLOCMES, reading local message file example/25
|
|
|
-FATAL [example.beta] MSG_BADSEVERITY, unrecognized log severity: beta_fatal
|
|
|
-ERROR [example.beta] MSG_BADDESTINATION, unrecognized log destination: beta_error
|
|
|
-WARN [example.beta] MSG_BADSTREAM, bad log console output stream: beta_warn
|
|
|
-INFO [example.beta] MSG_READERR, error reading from message file beta: info
|
|
|
-DEBUG [example.beta] MSG_BADSEVERITY, unrecognized log severity: beta/25
|
|
|
+FATAL [example] MSG_WRITERR error writing to test1: 42
|
|
|
+ERROR [example] MSG_RDLOCMES reading local message file dummy/file
|
|
|
+WARN [example] MSG_BADSTREAM bad log console output stream: example
|
|
|
+WARN [example.alpha] MSG_READERR error reading from message file a.txt: dummy reason
|
|
|
+INFO [example.alpha] MSG_OPENIN unable to open message file example.msg for input: dummy reason
|
|
|
+DEBUG [example] MSG_RDLOCMES reading local message file example/0
|
|
|
+DEBUG [example] MSG_RDLOCMES reading local message file example/24
|
|
|
+DEBUG [example] MSG_RDLOCMES reading local message file example/25
|
|
|
+FATAL [example.beta] MSG_BADSEVERITY unrecognized log severity: beta_fatal
|
|
|
+ERROR [example.beta] MSG_BADDESTINATION unrecognized log destination: beta_error
|
|
|
+WARN [example.beta] MSG_BADSTREAM bad log console output stream: beta_warn
|
|
|
+INFO [example.beta] MSG_READERR error reading from message file beta: info
|
|
|
+DEBUG [example.beta] MSG_BADSEVERITY unrecognized log severity: beta/25
|
|
|
.
|
|
|
./logger_example -c stdout -s debug -d 25 | cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|