log4j.properties 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. log4j.rootCategory=info,stdout,file
  2. log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  3. log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  4. log4j.appender.stdout.layout.ConversionPattern=%p - %c.%M(%L) | %m%n
  5. #log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
  6. #org.apache.log4j.DailyRollingFileAppender\uff08\u6bcf\u5929\u4ea7\u751f\u4e00\u4e2a\u65e5\u5fd7\u6587\u4ef6,\u5982\u4e0a\uff09
  7. #\u6587\u4ef6\u5927\u5c0f\u5230\u8fbe\u6307\u5b9a\u5c3a\u5bf8\u7684\u65f6\u5019\u4ea7\u751f\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6
  8. log4j.appender.file = org.apache.log4j.RollingFileAppender
  9. ## \u4e00\u4e2alog\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u8d85\u8fc7\u8fd9\u4e2a\u5927\u5c0f\u5c31\u53c8\u4f1a\u751f\u62101\u4e2a\u65e5\u5fd7 # KB \uff0cMB\uff0cGB
  10. log4j.appender.file.MaxFileSize = 2MB
  11. ## \u6700\u591a\u4fdd\u5b5830\u4e2a\u6587\u4ef6\u5907\u4efd
  12. log4j.appender.file.MaxBackupIndex = 30
  13. log4j.appender.file.File=${catalina.base}/logs/nwyj.log
  14. log4j.appender.file.DatePattern='.'yyyy-MM-dd
  15. log4j.appender.file.layout=org.apache.log4j.PatternLayout
  16. log4j.appender.file.layout.ConversionPattern=%d [%t] %p - %c.%M(%L) | %m%n
  17. log4j.appender.file.Append = true
  18. #JDBC Appender\u6570\u636e\u5e93\u64cd\u4f5c\u8bb0\u5f55\u5668
  19. #log4j.logger.todb = info,db
  20. #log4j.appender.db=org.apache.log4j.jdbc.JDBCAppender
  21. #\u6269\u5c55\u81ea\u5b9a\u4e49JDBC\u65e5\u5fd7\u8bb0\u5f55\u5668
  22. #log4j.appender.db=testDemo.testDB.pool.JDBCLogAppender
  23. #log4j.appender.db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
  24. #log4j.appender.db.URL=jdbc:sqlserver://192.168.100.183;databaseName=zzgl20110928
  25. #log4j.appender.db.user=sa
  26. #log4j.appender.db.password=sinosoft183
  27. #\u7f13\u5b58;0\u4e3a\u7acb\u5373\u63d2\u5165\u5230\u6570\u636e\u5e93
  28. #log4j.appender.db.bufferSize=0
  29. #log4j.appender.db.sql=insert into SYS_LOG(FD_OBJECTID, USER_ID, DISPLAY_NAME, DEPT_ID, OPTION_TIME, ACTION, DESCRIPTION, IP, URL) values ('%X{fdoId}','%X{txt}','%X{txt}','%X{txt}','%X{txt}','%X{txt}','%m','%X{txt}','%X{txt}')
  30. #log4j.appender.db.layout=org.apache.log4j.PatternLayout
  31. #\u9650\u5236\u6846\u67b6\u7684DEBUG\u7ea7\u522b\u8f93\u51fa(\u4fbf\u4e8e\u8c03\u8bd5)
  32. log4j.logger.org.springframework =info
  33. log4j.logger.org.quartz =info
  34. log4j.logger.com.mchange =info
  35. log4j.logger.com.sysmodel=info
  36. log4j.logger.org.apache =info
  37. log4j.logger.com.formaction.dao =info