×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Nhan Tran
Added: Aug 7, 2021 1:00 PM
Views: 3645
Tags: no tags
  1. # LOG4J configuration
  2. log4j.rootLogger=DEBUG, Appender1,Appender2
  3.  
  4. log4j.appender.Appender1=org.apache.log4j.ConsoleAppender
  5. log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout
  6. log4j.appender.Appender1.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n
  7.  
  8. log4j.appender.Appender2=org.apache.log4j.FileAppender
  9. log4j.appender.Appender2.File=D:/Logs/Log4jWebDemo.log
  10. log4j.appender.Appender2.layout=org.apache.log4j.PatternLayout
  11. log4j.appender.Appender2.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n
  12.