log4j.properties 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #############################################################################
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #############################################################################
  17. log4j.rootLogger=INFO,CONSOLE,R
  18. log4j.additivity.org.apache=true
  19. #spring 只打 INFO信息
  20. #log4j.logger.org.springframework=INFO
  21. #全局的日志级别(打印sql必须要该属性)
  22. log4j.appender.Threshold=DEBUG
  23. #ConsoleAppender
  24. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  25. log4j.appender.CONSOLE.Threshold=DEBUG
  26. log4j.appender.CONSOLE.Target=System.out
  27. log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  28. log4j.appender.CONSOLE.layout.ConversionPattern=%d %p [%t] %C.%M(%F:%L) - %m%n
  29. #FileAppender
  30. log4j.appender.R=org.apache.log4j.RollingFileAppender
  31. log4j.appender.R.Threshold=ERROR
  32. log4j.appender.R.File=/loygra/log/mooring/mooring.log
  33. log4j.appender.R.MaxFileSize=4096KB
  34. log4j.appender.R.Append=true
  35. log4j.appender.R.MaxBackupIndex=40
  36. log4j.appender.R.layout=org.apache.log4j.PatternLayout
  37. #Pattern to output : date priority [category] - <message>line_separator
  38. log4j.appender.R.layout.ConversionPattern=%d %p [%t] %C.%M(%F:%L) - %m%n
  39. #JDBC config
  40. log4j.logger.java.sql.ResultSet=DEBUG
  41. log4j.logger.java.sql.Connection=DEBUG
  42. log4j.logger.java.sql.Statement=DEBUG
  43. log4j.logger.java.sql.PreparedStatement=DEBUG
  44. log4j.logger.org.apache=DEBUG