Permalink
Browse files

fix: set the loggerName in ConnectionFactoryImpl.log (#1188)

In ConnectionFactoryImpl.log function locally generates the logRecord
but doesn't set the loggerName of the current Logger, as a result
the log ignores the class or package level logging configuration

fixes #1167
  • Loading branch information...
kommiharibabu authored and vlsi committed May 11, 2018
1 parent 354d285 commit f78a639d1ed3c64e80e1fa107691b4af5945cb84
Showing with 2 additions and 0 deletions.
  1. +2 −0 pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java
@@ -312,6 +312,8 @@ private static void log(Level level, String msg, Throwable thrown, Object... par
return;
}
LogRecord rec = new LogRecord(level, msg);
// Set the loggerName of the LogRecord with the current logger
rec.setLoggerName(LOGGER.getName());
rec.setParameters(params);
rec.setThrown(thrown);
LOGGER.log(rec);

0 comments on commit f78a639

Please sign in to comment.