jetbrick-jdbclog

jdbc logger for jetbrick

License

License

GroupId

GroupId

com.github.subchen
ArtifactId

ArtifactId

jetbrick-jdbclog
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

jetbrick-jdbclog
jdbc logger for jetbrick
Project URL

Project URL

http://subchen.github.io/jetbrick
Project Organization

Project Organization

jetbrick
Source Code Management

Source Code Management

https://github.com/subchen/jetbrick-jdbclog.git

Download jetbrick-jdbclog

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.subchen/jetbrick-jdbclog/ -->
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-jdbclog</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.subchen/jetbrick-jdbclog/
implementation 'com.github.subchen:jetbrick-jdbclog:1.0'
// https://jarcasting.com/artifacts/com.github.subchen/jetbrick-jdbclog/
implementation ("com.github.subchen:jetbrick-jdbclog:1.0")
'com.github.subchen:jetbrick-jdbclog:jar:1.0'
<dependency org="com.github.subchen" name="jetbrick-jdbclog" rev="1.0">
  <artifact name="jetbrick-jdbclog" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.subchen', module='jetbrick-jdbclog', version='1.0')
)
libraryDependencies += "com.github.subchen" % "jetbrick-jdbclog" % "1.0"
[com.github.subchen/jetbrick-jdbclog "1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.7

Project Modules

There are no modules declared in this project.

jetbrick-jdbclog

QQ群:310491655

This is a jdbc logger project for jetbrick, Support JDK6+.

Usage

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

<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-jdbclog</artifactId>
    <version>1.0</version>
</dependency>

Downloads

License

Copyright 2013-2014 Guoqiang Chen. All rights reserved. 
Email: [email protected]

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

Versions

Version
1.0