Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enable memcheck for tests test-help-*.
[simgrid.git] / teshsuite / xbt / log_usage / log_usage.tesh
index 1df8cbb..3d96f66 100644 (file)
@@ -1,21 +1,89 @@
-#! ./tesh
+#!/usr/bin/env tesh
 
+p Check different log thresholds
 $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
-> [  0.000000] [0:@] Test with the settings ''
-> [  0.000000] [0:@] val=2
-> [  0.000000] [0:@] false alarm!
-> [  0.000000] [0:@] Test with the settings ' '
-> [  0.000000] [0:@] val=2
-> [  0.000000] [0:@] false alarm!
-> [  0.000000] [0:@] Test with the settings ' test.thres:info root.thres:info  '
-> [  0.000000] [0:@] val=2
-> [  0.000000] [0:@] false alarm!
-> [  0.000000] [0:@] Test with the settings ' test.thres:debug '
-> [  0.000000] [0:@] val=1
-> [  0.000000] [0:@] val=2
-> [  0.000000] [0:@] false alarm!
-> [  0.000000] [0:@] Test with the settings ' test.thres:verbose root.thres:error '
-> [  0.000000] [0:@] val=2
-> [  0.000000] [0:@] false alarm!
-> [  0.000000] [0:@] Test with the settings ' test.thres:critical '
-> [  0.000000] [0:@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [  0.000000] [0:maestro@] val=1
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+p Check the "file" log appender
+$ $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
+$ cat ${bindir:=.}/log_usage.log
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [  0.000000] [0:maestro@] val=1
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+p Check the "rollfile" log appender
+$ $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
+$ cat ${bindir:=.}/log_usage.log
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+>
+> [End of log]
+> ] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [  0.000000] [0:maestro@] val=1
+>
+>                    
+
+p Check the "splitfile" log appender
+$ $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
+$ cat ${bindir:=.}/log_usage_0.log
+> [  0.000000] [0:maestro@] Test with the settings ''
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info  '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [  0.000000] [0:maestro@] val=1
+
+$ cat ${bindir:=.}/log_usage_1.log
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [  0.000000] [0:maestro@] val=2
+> [  0.000000] [0:maestro@] false alarm!
+> [  0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [  0.000000] [0:maestro@] false alarm!
+
+$ rm -f ${bindir:=.}/log_usage.log ${bindir:=.}/log_usage_0.log ${bindir:=.}/log_usage_1.log