Welcome to dbForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Configuring Logging

 
   Database Forums (Home) -> JDBC Driver RSS
Next:  CPU VP Issue  
Author Message
Wes Clark

External


Since: Jan 12, 2006
Posts: 60



(Msg. 1) Posted: Fri May 16, 2008 1:08 pm
Post subject: Configuring Logging
Archived from groups: microsoft>public>sqlserver>jdbcdriver (more info?)

I figured out how to turn on the JDBC logging through code, but it is not in
the code our customers are running, and I would like to turn on the JDBC
driver logging only with a configuration file. Is this possible? I'm trying
a logging.properties file in the same directory as the driver containing

# Specify the handlers to create in the root logger
# (all loggers are children of the root logger).
# The following creates two handlers.
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler

# Set the default logging level for the root logger.
.level = OFF

# Set the default logging level for new ConsoleHandler instances.
java.util.logging.ConsoleHandler.level = FINE

# Set the default logging level for new FileHandler instances.
java.util.logging.FileHandler.level = OFF

# Set the default formatter for new ConsoleHandler instances.
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter

# Set the default logging level for the logger named ConnectionPool.
ConnectionPool.level = OFF

# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter



############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.microsoft.sqlserver.jdbc.level = ALL

I haven't got any output yet. I'm kind of desparate, so any help would be
greatly apprceciated.

 >> Stay informed about: Configuring Logging 
Back to top
Login to vote
Wes Clark

External


Since: Jan 12, 2006
Posts: 60



(Msg. 2) Posted: Fri May 16, 2008 10:32 pm
Post subject: RE: Configuring Logging [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm gong provide an answer to my problem. After some research into the
rather widely avoided java.util.Logging package, I got something to work. I
edited the logging.properties file in the jre/lib directory where my Tomcat
app server was starting. Doing this got the tracing going. I'm sure some
others could offer suggestions. On my Windows box, the trace file was create
off my home directory, "C:\Documents and Settings\wclark" . The
modifications I made to the jre\lib\logging.properties files was:
adding
# Logging lever for SQL Server
com.microsoft.sqlserver.jdbc.level = ALL
at the end; uncommenting
handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
and modifying
java.util.logging.FileHandler.pattern = %h/java%g.log
java.util.logging.FileHandler.limit = 0
java.util.logging.FileHandler.count = 0
limt was set to 5000, which means I got 5000 bytes in the file and then it
rewrote it.
Anyway it worked.

 >> Stay informed about: Configuring Logging 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
JDBC Driver for SQL 7.0 ? - Hi; I'm installing an application that requires a JDBC driver for SQL Server. The thing is I am running SQL Server 7.0 and a look at Microsoft seems to show there are lots of these drivers for SQL 2000 but not for 7.0 I know little about these things -...

JDBC driver conflict with "System.in.read();"????????????? - Hi; I'm writing a application which access the SQL SERVER 2000 by "SQL SERVER Driver for JDBC SP3". I create a thread class to fecth data from database,code like blow: public class DBThread extends Thread{ public void run(){...

using applet it is throwing exception - when i try to access database using applet it is throwing following exception with oracle 9.2 driver Database Exception:java.security.AccessControlException: access denied (java.util.PropertyPermission oracle.jserver.version read) it is throwing..

Multiple ResultSets - Hi I have a stored procedure which returns mulitple resultsets rs = call.executeQuery(); call.getMoreResults(); irs = call.getResultSet(); I want to pass these two resultsets to another method. When i pass these two i get error saying "ResultSet ...

JDBC or ODBC? - I am in the interesting position of having to choose between using an ODBC or JDBC connection for a high traffic site. We can develop on either environment though I prefer the Java based one. Database connectivity to our SQL 2000 server is our numbe...
   Database Forums (Home) -> JDBC Driver All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]