Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JDBC logging to monitor activities
- Loading branch information
Showing
5 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ pom.xml.asc | |
/.nrepl-port | ||
.hgignore | ||
.hg/ | ||
!/lib/slf4j-simple-1.7.12.jar |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# the appender used for the JDBC API layer call logging above, sql only | ||
log4j.appender.sql=org.apache.log4j.ConsoleAppender | ||
log4j.appender.sql.Target=System.out | ||
log4j.appender.sql.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.sql.layout.ConversionPattern= \u001b[0;31m (SQL)\u001b[m %d{yyyy-MM-dd HH:mm:ss.SSS} \u001b[0;32m %m \u001b[m %n | ||
|
||
# ============================================================================== | ||
# JDBC API layer call logging : | ||
# INFO shows logging, DEBUG also shows where in code the jdbc calls were made, | ||
# setting DEBUG to true might cause minor slow-down in some environments. | ||
# If you experience too much slowness, use INFO instead. | ||
|
||
log4jdbc.drivers=org.postgresql.Driver | ||
|
||
# Log all JDBC calls except for ResultSet calls | ||
log4j.logger.jdbc.audit=FATAL,sql | ||
log4j.additivity.jdbc.audit=false | ||
|
||
# Log only JDBC calls to ResultSet objects | ||
log4j.logger.jdbc.resultset=FATAL,sql | ||
log4j.additivity.jdbc.resultset=false | ||
|
||
# Log only the SQL that is executed. | ||
log4j.logger.jdbc.sqlonly=FATAL,sql | ||
log4j.additivity.jdbc.sqlonly=false | ||
|
||
# Log timing information about the SQL that is executed. | ||
log4j.logger.jdbc.sqltiming=FATAL,sql | ||
log4j.additivity.jdbc.sqltiming=false | ||
|
||
# Log connection open/close events and connection number dump | ||
log4j.logger.jdbc.connection=FATAL,sql | ||
log4j.additivity.jdbc.connection=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters