The version of Apache log4j used by SoundHelix.
Clone
HTTPS:
git clone https://vervis.peers.community/repos/aEp6o
SSH:
git clone USERNAME@vervis.peers.community:aEp6o
Branches
Tags
- 1.3alpha-7
- CHAINSAW_2_SANDBOX_MERGE
- CORE_VERSION
- LEVEL_REPLACES_PRIORITY
- PREALPHA_1_3_AS_OF_2004_05_12
- PRE_CHAINSAW_MODEL_CONVERSION
- PRE_UGLI_MOVE
- TAG_CHAINSAW2_MOVE
- log4j-1.2.17
- log4j-1.2.17-rc1
- v1.3alpha8
- v1.3alpha8-temp
- v1_2_1
- v1_2_10-recalled
- v1_2_11
- v1_2_11_rc1
- v1_2_11rc3
- v1_2_12
- v1_2_12_rc1
- v1_2_12_rc2
- v1_2_12_rc3
- v1_2_12_rc4
- v1_2_12_rc5
- v1_2_12_rc6
- v1_2_13
- v1_2_13_rc1
- v1_2_13_rc2
- v1_2_13_site_update
- v1_2_14
- v1_2_14_maven
- v1_2_14_rc1
- v1_2_14_site_update
- v1_2_15
- v1_2_15_rc1
- v1_2_15_rc2
- v1_2_15_rc3
- v1_2_15_rc4
- v1_2_15_rc5
- v1_2_15_rc6
- v1_2_16
- v1_2_16_rc1
- v1_2_16_rc2
- v1_2_17
- v1_2_17-rc1
- v1_2_17_rc1
- v1_2_17_rc2
- v1_2_17_rc3
- v1_2_2
- v1_2_3
- v1_2_4
- v1_2_6
- v1_2_7
- v1_2_9
- v1_2_alpha0
- v1_2_alpha7
- v1_2beta1
- v1_2final
- v1_3alpha_1
- v1_3alpha_6
- v_1_0
- v_1_0_1
- v_1_0_4
- v_1_1
- v_1_1_1
- v_1_1_2
- v_1_1_3
- v_1_1_b1
- v_1_1b2
- v_1_1b3
- v_1_1b5
- v_1_1b6
- v_1_1b7
- v_1_2beta3
confParsing
#!/bin/bash
# Read the .functions file
. .functions
declare -i start=$1
setPERL
# =========================================================================
# This script runs ConfigurationFileParsing java program with args1 and 2.
# It has the side effect of aggregating the following arguments to one
# file called $TEMP.
# It runs a perl filter to remove date, line and other variable
# information from the output.
# =========================================================================
function testConfigurationParsing {
configFile=$1;
options=$2; shift; shift;
echo -n " ConfigurationParsing test $TEST - "
java $D_FLAG org.apache.log4j.test.ConfigurationFileParsing $configFile
if [ -n "$*" ]; then
cat $* $TEMP >> $TEMP.x
mv $TEMP.x $TEMP
fi
$PERL filter.pl $TEMP $OUTPUT ConfigurationFileParsing $options
if [ $? != 0 ]; then
echo "The output is not in expected format. See the file [$OUTPUT]."
exit 1
fi
check witness/confParsing.$TEST $OUTPUT; echo " OK"
}
# =========================================================================
# Just run ConfigurationFileParsing and direct the output to STDOUT or
# STDERR.
# =========================================================================
function testConfigurationParsingII {
conf=$1;
target=$2
case $target in
OUT )
java $D_FLAG org.apache.log4j.test.ConfigurationFileParsing $conf>$TEMP
;;
ERR )
java $D_FLAG org.apache.log4j.test.ConfigurationFileParsing $conf>& $TEMP
;;
esac
check witness/confParsing.$TEST $TEMP; echo " OK"
}
# ======================================================
declare -i TEST
TEST=1;
if [ $TEST -ge $start ]; then
D_FLAG=$DEF_DEBUG
echo "log4j.rootCategory=DEBUG, testAppender" > $LCF
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File= $TEMP"
lecho "log4j.appender.testAppender.Append=false"
lecho "log4j.appender.testAppender.layout.ContextPrinting= false "
lecho "log4j.appender.testAppender.layout.ThreadPrinting= xx "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout "
testConfigurationParsing $LCF LINE_NUMBER
fi
TEST=2;
if [ $TEST -ge $start ]; then
D_FLAG=$DEF_DEBUG
echo "log4j.rootCategory=DEBUG, testAppender" > $LCF
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File= $TEMP"
lecho "log4j.appender.testAppender.Append=false"
lecho "log4j.appender.testAppender.MaxFileSize=1KB"
lecho "log4j.appender.testAppender.MaxBackupIndex= 1 "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.ThreadPrinting=true"
lecho "log4j.appender.testAppender.layout.DateFormat=ReLaTIve"
testConfigurationParsing $LCF RELATIVE
fi
TEST=3;
if [ $TEST -ge $start ]; then
D_FLAG=$DEF_DEBUG
echo "18:25:32.394 [main] DEBUG testing - HELLO WORLD" > $TEMP
echo "log4j.rootCategory=DEBUG, testAppender" > $LCF
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File=$TEMP"
lecho "log4j.appender.testAppender.Append=true"
lecho "log4j.appender.testAppender.MaxFileSize=54"
lecho "log4j.appender.testAppender.MaxBackupIndex= 0 "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=aBSOlute"
lecho "log4j.appender.testAppender.layout.TimeZone=GMT"
testConfigurationParsing $LCF ABSOLUTE
fi
TEST=4;
if [ $TEST -ge $start ]; then
D_FLAG=$DEF_DEBUG
echo "18:25:32,394 [main] DEBUG testing - HELLO WORLD" > $TEMP
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File=$TEMP"
lecho "log4j.appender.testAppender.Append=true"
lecho "log4j.appender.testAppender.MaxFileSize=155"
lecho "log4j.appender.testAppender.MaxBackupIndex=0"
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=aBSOlute"
lecho "log4j.appender.testAppender.layout.TimeZone=ECT"
testConfigurationParsing $LCF ABSOLUTE
fi
TEST=5;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "18:25:32,394 [main] DEBUG testing - HELLO WORLD" > $TEMP
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.debug="
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File=$TEMP"
lecho "log4j.appender.testAppender.Append= true"
lecho "log4j.appender.testAppender.MaxFileSize= 1 "
lecho "log4j.appender.testAppender.MaxBackupIndex= 2"
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=aBSOlute"
lecho "log4j.appender.testAppender.layout.TimeZone=ECT"
testConfigurationParsing $LCF ABSOLUTE $TEMP.2 $TEMP.1
fi
TEST=6;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= , testAppender" > $LCF
lecho "log4j.debug="
lecho "log4j.appender.testAppender=org.apache.log4j.FileAppender"
lecho "log4j.appender.testAppender.File=$TEMP"
lecho "log4j.appender.testAppender.Append= false "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=dAtE"
lecho "log4j.appender.testAppender.layout.TimeZone="
testConfigurationParsing $LCF DATE
fi
TEST=7;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "18:25:32,394 [main] DEBUG testing - HELLO WORLD" > $TEMP
echo "log4j.rootCategory= DEBUG , testAppender, inexistentAppender" > $LCF
lecho "log4j.debug=false"
lecho "log4j.appender.testAppender=org.apache.log4j.RollingFileAppender"
lecho "log4j.appender.testAppender.File=$TEMP"
lecho "log4j.appender.testAppender.Append= true"
lecho "log4j.appender.testAppender.MaxFileSize= 1 "
lecho "log4j.appender.testAppender.MaxBackupIndex=2 "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=aBSOlute"
lecho "log4j.appender.testAppender.layout.TimeZone=ECT"
testConfigurationParsing $LCF ABSOLUTE $TEMP.2 $TEMP.1
fi
TEST=8;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.debug=false"
lecho "log4j.appender.testAppender=org.apache.log4j.ConsoleAppender"
# Note the spaces
lecho "log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout "
lecho "log4j.appender.testAppender.layout.ConversionPattern=[%t] %p - %m%n"
echo -n " ConfigurationParsing test $TEST - "
testConfigurationParsingII $LCF OUT
fi
TEST=9;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.debug=false"
lecho "log4j.appender.testAppender=org.apache.log4j.ConsoleAppender"
lecho "log4j.appender.testAppender.Target= System.out "
# lecho "log4j.appender.testAppender.Append= true "
lecho "log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout"
lecho "log4j.appender.testAppender.layout.ConversionPattern=[%t] %p - %m%n"
echo -n " ConfigurationParsing test $TEST (can fail if anything is written to System.err) - "
testConfigurationParsingII $LCF ERR
fi
# Test variable subst from System properties
TEST=10;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.debug=false"
lecho "log4j.appender.testAppender=org.apache.log4j.FileAppender"
# We escape the dollar sign to avoid substitution at the shell level.
lecho "log4j.appender.testAppender.File=\${user.dir}/$TEMP"
lecho "log4j.appender.testAppender.Append=false"
lecho "log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout"
lecho "log4j.appender.testAppender.layout.ConversionPattern=AVY [%t] %p-%m%n"
testConfigurationParsing $LCF NONE
fi
rm $TEMP > /dev/null
# Test variable subst from the config file itself
TEST=11;
if [ $TEST -ge $start ]; then
D_FALG=""
echo "log4j.rootCategory= DEBUG , testAppender" > $LCF
lecho "log4j.configDebug=false"
# $TEMP will be replaced by the shell
lecho "t=$TEMP"
lecho "log4j.appender.testAppender=org.apache.log4j.FileAppender"
# We escape the dollar sign to avoid substitution at the shell level.
lecho "log4j.appender.testAppender.File=\${t}"
lecho "log4j.appender.testAppender.Append=false"
lecho "log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout"
lecho "log4j.appender.testAppender.layout.ConversionPattern=VSUB [%t] %p-%m%n"
testConfigurationParsing $LCF NONE
fi
# Do SyslogAppender test (not real tests)
TEST=100;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= , testAppender" > $LCF
lecho "log4j.debug=true"
lecho "log4j.appender.testAppender=org.apache.log4j.net.SyslogAppender"
lecho "log4j.appender.testAppender.SyslogHost=localhost"
lecho "log4j.appender.testAppender.Facility= LOCAL0 "
lecho "log4j.appender.testAppender.FacilityPrinting=true"
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=NULL"
lecho "log4j.appender.testAppender.layout.TimeZone="
echo -n " ConfigurationParsing test $TEST - "
java $D_FLAG org.apache.log4j.test.ConfigurationFileParsing $LCF
fi
TEST=101;
if [ $TEST -ge $start ]; then
D_FLAG=""
echo "log4j.rootCategory= , testAppender" > $LCF
lecho "log4j.debug=true"
lecho "log4j.appender.testAppender=org.apache.log4j.net.SyslogAppender"
lecho "log4j.appender.testAppender.SyslogHost=localhost"
lecho "log4j.appender.testAppender.Facility="
lecho "log4j.appender.testAppender.FacilityPrinting="
lecho "log4j.appender.testAppender.layout=org.apache.log4j.TTCCLayout"
lecho "log4j.appender.testAppender.layout.DateFormat=NULL"
lecho "log4j.appender.testAppender.layout.TimeZone="
echo -n " ConfigurationParsing test $TEST - "
java $D_FLAG org.apache.log4j.test.ConfigurationFileParsing $LCF
fi