X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/83ab92262519600b52ea187de3ce0ed0d70c0648..4f2a045034b355355ed07cb0e39984ec467ac58d:/teshsuite/xbt/log_usage/log_usage.tesh diff --git a/teshsuite/xbt/log_usage/log_usage.tesh b/teshsuite/xbt/log_usage/log_usage.tesh index 0ef0851d11..d97286796b 100644 --- a/teshsuite/xbt/log_usage/log_usage.tesh +++ b/teshsuite/xbt/log_usage/log_usage.tesh @@ -1,6 +1,7 @@ -#! ./tesh +#!/usr/bin/env tesh -$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" +p Check different log thresholds +$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" > [ 0.000000] [0:maestro@] Test with the settings '' > [ 0.000000] [0:maestro@] val=2 > [ 0.000000] [0:maestro@] false alarm! @@ -19,3 +20,98 @@ $ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m > [ 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 +$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%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 +$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%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 +> +> + +$ rm -f ${bindir:=.}/log_usage.log + +p Check the "splitfile" log appender +$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%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_0.log ${bindir:=.}/log_usage_1.log + +p Check the "splitfile" log appender without percent in template +$ ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n" --log=root.app:splitfile:500:${bindir:=.}/log_usage.log. +$ cat ${bindir:=.}/log_usage.log.0 +> [ 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.log.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! + +$ rm -f ${bindir:=.}/log_usage.log.0 ${bindir:=.}/log_usage.log.1