[英]what extension to use for setting a file name using log4j
is there any documentation that while i am using the log4j, what will be the file extension 我在使用log4j时是否有任何文档,文件扩展名是什么
#Normal Log File
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=/logs/apps/application.txt
log4j.appender.logfile.MaxFileSize=100KB
log4j.appender.logfile.MaxBackupIndex=100
log4j.appender.logfile.layout=com.log4j.WebSpherePatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d [~C | ~N | ~S] %-5p (%F:%M():%L) - %m%n
any specific extension or i can use extension like .txt , .log, .out etc .... 任何特定的扩展名,或者我可以使用.txt,.log,.out等扩展名...。
I think you can use any extension file based on your preference. 我认为您可以根据自己的喜好使用任何扩展文件。 Based on your configuration when it reach 100KB the file will rotate to
application.txt.1
. 根据您的配置,当文件大小达到100KB时,文件将旋转到
application.txt.1
。 log
extension is preferable since the purpose of the file is for logging
最好使用
log
扩展名,因为文件的目的是logging
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.