2013년 11월 13일 수요일

[참고] log4jsql

http://log4sql.sourceforge.net/index_kr.html
사용법
1.다운받은 zip파일을 압축을 풀고 log4sql.jar를 클래스 패스에 넣습니다.
2.commons-lang.jar파일을 다운받아서 클래스 패스에 넣습니다.
3.드라이버명을 다음과 같이 바꿉니다.

JDBC TYPE Origin Your Driver Class -> log4sql Driver Class
[ORACLE DRIVER CLASS] 'oracle.jdbc.drirver.OracleDriver' -> 'core.log.jdbc.driver.OracleDriver'
[MYSQL DRIVER CLASS] 'com.mysql.jdbc.Driver' or'org.gjt.mm.mysql.Driver' -> 'core.log.jdbc.driver.MysqlDriver'
[SYBASE DRIVER CLASS] 'com.sybase.jdbc2.jdbc.SybDriver' -> 'core.log.jdbc.driver.SybaseDriver'
[DB2 DRIVER CLASS] 'com.ibm.db2.jcc.DB2Driver' -> 'core.log.jdbc.driver.DB2Driver'
[INFOMIX DRIVER CLASS] 'com.informix.jdbc.IfxDriver' -> 'core.log.jdbc.driver.InfomixDriver'
[POSTGRESQL DRIVER CLASS] 'org.postgresql.Driver' -> 'core.log.jdbc.driver.PostgresqlDriver'
[MAXDB DRIVER CLASS] 'com.sap.dbtech.jdbc.DriverSapDB' -> 'core.log.jdbc.driver.MaxDBDriver'
[FRONTBASE DRIVER CLASS] 'com.frontbase.jdbc.FBJDriver' -> 'core.log.jdbc.driver.FrontBaseDriver'
[HSQL DRIVER CLASS] 'org.hsqldb.jdbcDriver' -> 'core.log.jdbc.driver.HSQLDriver'
[POINTBASE DRIVER CLASS] 'com.pointbase.jdbc.jdbcUniversalDriver' -> 'core.log.jdbc.driver.PointBaseDriver'
[MIMER DRIVER CLASS] 'com.mimer.jdbc.Driver' -> 'core.log.jdbc.driver.MimerDriver'
[PERVASIVE DRIVER CLASS] 'com.pervasive.jdbc.v2.Driver' -> 'core.log.jdbc.driver.PervasiveDriver'
[DAFFODILDB DRIVER CLASS] 'in.co.daffodil.db.jdbc.DaffodilDBDriver' -> 'core.log.jdbc.driver.DaffodiLDBDriver'
[JDATASTORE DRIVER CLASS] 'com.borland.datastore.jdbc.DataStoreDriver' -> 'core.log.jdbc.driver.JdataStoreDriver'
[CACHE DRIVER CLASS] 'com.intersys.jdbc.CacheDriver' -> 'core.log.jdbc.driver.CacheDriver'
[DERBY DRIVER CLASS] 'org.apache.derby.jdbc.ClientDriver' -> 'core.log.jdbc.driver.DerbyDriver'
[ALTIBASE DRIVER CLASS] 'Altibase.jdbc.driver.AltibaseDriver' -> 'core.log.jdbc.driver.AltibaseDriver'
[MCKOI DRIVER CLASS] 'com.mckoi.JDBCDriver' -> 'core.log.jdbc.driver.MckoiDriver'
[JSQL DRIVER CLASS] 'com.jnetdirect.jsql.JSQLDriver' -> 'core.log.jdbc.driver.JsqlDriver'
[JTURBO DRIVER CLASS] 'com.newatlanta.jturbo.driver.Driver' -> 'core.log.jdbc.driver.JturboDriver'
[JTDS DRIVER CLASS] 'net.sourceforge.jtds.jdbc.Driver' -> 'core.log.jdbc.driver.JTdsDriver'
[INTERCLIENT DRIVER CLASS] 'interbase.interclient.Driver' -> 'core.log.jdbc.driver.InterClientDriver'
[PURE JAVA DRIVER CLASS] 'org.firebirdsql.jdbc.FBDriver' -> 'core.log.jdbc.driver.PureJavaDriver'
[JDBC-ODBC DRIVER CLASS] 'sun.jdbc.odbc.JdbcOdbcDriver' -> 'core.log.jdbc.driver.JdbcOdbcDriver'
[MSSQL 2000 DRIVER CLASS] 'com.microsoft.jdbc.sqlserver.SQLServerDriver' -> 'core.log.jdbc.driver.MssqlDriver'
[MSSQL 2005 DRIVER CLASS] 'com.microsoft.sqlserver.jdbc.SQLServerDriver' -> 'core.log.jdbc.driver.Mssql2005Driver'

콘솔에서 확인해보면 쿼리가 출력되고 실행시간도 출력이 됩니다.
log4sql.jarcommons-lang.jar


[퍼옴] http://jbluewing.tistory.com/92

댓글 없음:

댓글 쓰기