Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
  2. <!-- The active file to log to -->
  3. <param name="file" value="/applogs/myportal/portal.log" />
  4. <param name="append" value="true" />
  5. <param name="encoding" value="UTF-8" />
  6.  
  7. <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
  8. <!-- The file to roll to, this is a fairly intelligent parameter, if the file
  9. ends in .gz, it gzips it, based on the date stamp it rolls at that time,
  10. default is yyyy-MM-dd, (rolls at midnight)
  11. -->
  12. <param name="FileNamePattern" value="/applogs/myportal/portal.%d.log.gz" />
  13. </rollingPolicy>
  14.  
  15. <layout class="org.apache.log4j.PatternLayout">
  16. <param name="ConversionPattern" value="%5p %d{ISO8601} [%t][%x] %c - %m%n" />
  17. </layout>
  18. </appender>
  19.  
  20. <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
  21. <param name="FileNamePattern" value="/opt/app/srdotcom/logs/portal.%d{yyyy-MM-dd-HH-mm}.log.zip" />
  22. </rollingPolicy>
  23.  
  24. <layout class="org.apache.log4j.PatternLayout">
  25. <param name="ConversionPattern" value="%d{YYYY-MM-dd HH:mm:ss:SSS z}| %c{2}| %m%n" />
  26. </layout>
  27.  
  28. <dependency>
  29. <groupId>log4j</groupId>
  30. <artifactId>log4j</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>log4j</groupId>
  34. <artifactId>apache-log4j-extras</artifactId>
  35. <version>1.2.17</version>
  36. </dependency>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement