简体   繁体   中英

How disable SQL Server jdbc driver logging from a java application?

When I change the application log level to FINE, SQL Servers log also uses it, and, as consequence, I get a lot of unnecessary log messages. How can I turn off SQL Server log messages?

before starts the jdbc connection, change de value of the property:

Logger logger = Logger.getLogger("com.microsoft.sqlserver.jdbc");
logger.setLevel(Level.OFF);

I ended up using WARNING

Other status are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, OFF and all

more information at: http://msdn.microsoft.com/en-us/library/ms378517(SQL.90).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM