resiliency
来自「实现在电脑平台上控制短信modem或手机进行通讯的jar包和相关实例」· 代码 · 共 42 行
TXT
42 行
# This shell script checks whether for a given computing environment# the ResilientFileAppender can cope with renaming of the file where# the log output goes. # Test show that under Linux the ResilientFileAppender correctly copes# with renaming of files. On the other hand, under Windows 2000 the# premise of ResilientFileAppender is false because under Windows 2000# it is not possible to rename an open file.# Read the .functions file. ../../test/.functionsTEMP=tempsetPERLecho "log4j.rootCategory=DEBUG, testAppender" > $LCFlecho "log4j.appender.testAppender=org.apache.log4j.ResilientFileAppender"lecho "log4j.appender.testAppender.File=$TEMP"lecho "log4j.appender.testAppender.Append=false"lecho "log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout"lecho "log4j.appender.testAppender.layout.ConversionPattern=%m%n"rm ${TEMP}*MAX_COUNTER=3MAX_MESSAGES=50000perl elf.pl $TEMP $MAX_COUNTER&java org.apache.log4j.test.Loop $LCF $MAX_MESSAGESif perl checkForHoles.pl $TEMP $MAX_COUNTER $MAX_MESSAGES then echo "Resiliency test PASSED for this environment."else echo "Resiliency test FAILED." exit 1fi
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?