https://github.com/subchen/jetbrick-jdbclog
jdbc logger for jetbrick
https://github.com/subchen/jetbrick-jdbclog
Last synced: 5 months ago
JSON representation
jdbc logger for jetbrick
- Host: GitHub
- URL: https://github.com/subchen/jetbrick-jdbclog
- Owner: subchen
- License: apache-2.0
- Created: 2014-09-12T08:06:25.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-12T09:04:36.000Z (almost 12 years ago)
- Last Synced: 2023-07-01T00:04:48.798Z (almost 3 years ago)
- Language: Java
- Homepage:
- Size: 141 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jetbrick-jdbclog
================
This is a jdbc logger project for jetbrick, **Support JDK6+**.
Usage
==================
```java
DriverManagerDataSource ds = new DriverManagerDataSource();
ds.setDriverClassName("jetbrick.jdbclog.JdbcLogDriver");
ds.setUrl("jdbc:oracle:thin:@localhost:1521:orcl");
ds.setUsername("sa");
ds.setPassword("");
```
This JdbcLogDriver can auto identify following drivers.
* MySQL
* Oracle
* JTDS
* SQL Server 97/2000/2005
* DB2
* SyBase
* PostgreSQL
* HSqlDB
* Derby
* Informix
* TimesTen
* IBM-AS400
* SAP DB
* InterBase
* JDBC-ODBC
If you use other driver, you can add real driver class name into connection url string.
Pattern: CustomizeConnectionUrl = `"jdbclog" ":" [DriverClassName] ":" ConnectionUrl`.
In customize connection url, the DriverClassName is optional.
For Oracle:
```
jdbclog:oracle.jdbc.driver.OracleDriver:jdbc:oracle:thin:@localhost:1521:orcl
```
If you use `jdbc-odbc Bridge` or `Apache Derby`, you must use customize connection url.
For Derby:
```
jdbclog::jdbc:derby:MyDB;user=test;password=test
```
Maven
==================
```xml
com.github.subchen
jetbrick-jdbclog
1.0
```
Downloads
==================
* [jetbrick-jdbclog-1.0.jar][1]
* [slf4j-api-1.7.7.jar][2]
[1]: http://search.maven.org/remotecontent?filepath=com/github/subchen/jetbrick-jdbclog/1.0/jetbrick-jdbclog-1.0.jar
[2]: http://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar
License
==================
```
Copyright 2013-2014 Guoqiang Chen. All rights reserved.
Email: subchen@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
```
