Open alexanderabramov opened 5 years ago
its been already solved: https://github.com/brunorozendo/log4jdbc-log4j2/issues/40
How is linked #40 related? That one is about loading the driver, this one is about configuring rdbmsSpecifics for a driver. There is no configuration setting for rdbmsSpecifics.
This commit fixes the issue: https://github.com/alexanderabramov/log4jdbc-log4j2/commit/d74bfa27027564a59d2433b1e9e219b68e35060f
Please check this link
https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-driver-name.html
Sorry, I don't understand what you are saying.
Your link says com.mysql.cj.jdbc.Driver
is the correct driver name.
log4jdbc-log4j2 source code does not have rdms specifics configured for this driver name. Therefore it does not print dates correctly.
Commit I've linked adds it. Therefore it starts printing dates correctly.
Sorry, I don't understand what you are saying.
Your link says
com.mysql.cj.jdbc.Driver
is the correct driver name.log4jdbc-log4j2 source code does not have rdms specifics configured for this driver name. Therefore it does not print dates correctly.
Commit I've linked adds it. Therefore it starts printing dates correctly.
Yeah, I have the same question.
Sorry, I don't understand what you are saying. Your link says
com.mysql.cj.jdbc.Driver
is the correct driver name. log4jdbc-log4j2 source code does not have rdms specifics configured for this driver name. Therefore it does not print dates correctly. Commit I've linked adds it. Therefore it starts printing dates correctly.Yeah, I have the same question.
When I edit the source code and change driver name to "com.mysql.cj.jdbc.Driver" ,It works
https://github.com/brunorozendo/log4jdbc-log4j2/blob/master/log4jdbc-log4j2-jdbc4.1/src/main/java/net/sf/log4jdbc/sql/jdbcapi/DriverSpy.java#L222
rdbmsSpecifics does not include new MySQL driver com.mysql.cj.jdbc.Driver, so it logs dates using default format (e.g. '12/31/2018 00:00:00.000'), not MySqlRdbmsSpecifics (e.g. '2018-12-31 00:00:00'
As a result logging line is confusing and no longer directly executable in mysql console.
Related to #32