brunorozendo / log4jdbc-log4j2

Automatically exported from code.google.com/p/log4jdbc-log4j2
48 stars 39 forks source link

mysql8.0 problems #40

Closed VINO42 closed 6 years ago

VINO42 commented 6 years ago

Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

pom:

org.bgee.log4jdbc-log4j2 log4jdbc-log4j2-jdbc4.1 1.16
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
    </dependency>
                <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>8.0.11</version>
    </dependency>

using springboot 1.5.6

brunorozendo commented 6 years ago

If you try ? -Dlog4jdbc.auto.load.popular.drivers=false -Dlog4jdbc.drivers=com.mysql.cj.jdbc.Driver

VINO42 commented 6 years ago

ok, what should I do in the application.properties?

VINO42 commented 6 years ago

like this?: log4jdbc.auto.load.popular.drivers=false log4jdbc.drivers=com.mysql.cj.jdbc.Driver

I will try it

brunorozendo commented 6 years ago

The file is log4jdbc.log4j2.properties

VINO42 commented 6 years ago

I just tried this is my log4jdbc.log4j2.properties contents: log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator log4jdbc.auto.load.popular.drivers=false log4jdbc.drivers=com.mysql.cj.jdbc.Driver

it seems the log dispeared

thx!