weblogic8.1打印详细的jdbc日志_Tomcat, WebLogic及J2EE讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Tomcat, WebLogic及J2EE讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 4040 | 回复: 0   主题: weblogic8.1打印详细的jdbc日志        下一篇 
John
注册用户
等级:大元帅
经验:90444
发帖:136
精华:2
注册:2011-7-21
状态:离线
发送短消息息给John 加好友    发送短消息息给John 发消息
发表于: IP:您无权察看 2011-8-15 14:10:27 | [全部帖] [楼主帖] 楼主

转载此文请保留原作者信息及出处: http://www.tonyxu.net

最近遇到了一个问题,需要查看比较详细的jdbc log,最好是能看到故障时间点的sql,但是weblogic8.1版本的jdbc.log并不能拿到我们需要的信息(信息量太少)。下面提供一种可以打印详细jdbc log的方法,但是是否对解决我的问题有帮助,还需进一步的分析。

该方法如下:

1. Create a new file and put the following entries(properties) into the file

handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
java.util.logging.FileHandler.pattern = jdbc.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
java.util.logging.ConsoleHandler.level = SEVERE
java.util.logging.ConsoleHandler.formatter =java.util.logging.SimpleFormatter
oracle.jdbc.level = FINE
2. Make sure $ORACLE_HOME/jdbc/lib/ojdbc14_g.jar file is included in the CLASSPATH environment variable instead of ojdbc14.jar file.
Please download ojdbc14_g.jar in following link and add it to the beginning of classpath
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html
.
3. Enable tracing by adding following option to “JAVA_OPTIONS” in weblogic start script:
-Doracle.jdbc.Trace=true -Djava.util.logging.config.file={path to properties file location} {class file name} -Doracle.jdbc.LogFile=<path to jdbc log>/jdbc.log


如果对解决问题有进展,我会更新此文章。




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论