如何将sql查询添加到log4j文件中..我正在使用oracle 10g简单的jdbc应用程序..(即在query..to logfie中注册,登录信息等)
# Log levels
log4j.rootLogger=INFO,CONSOLE,R
# Appender Configuration
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
# Pattern to output the caller's file name and line number
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
# Rolling File Appender
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.DatePattern='.'DD-MM-YYYY
# Path and file name to store the log file E:/logs
log4j.appender.R.File=D:\\log4j\\log\\my4.txt
log4j.appender.R.MaxFileSize=200KB
# Number of backup files
log4j.appender.R.MaxBackupIndex=2
# Layout for Rolling File Appender
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %c - %p - %m%n
log4j.appender.R.layout.ConversionPattern=%d{DD-MM-YYYY HH:mm} %c %M (%F:%L)-%m%n