Skip to content

Commit 2d80fdd

Browse files
committed
Extract method to do actual logging
1 parent 094dc66 commit 2d80fdd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mq/main/logger/src/main/java/com/sun/messaging/jmq/util/log/SysLogHandler.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,15 @@ public SysLogHandler(Properties props) {
101101

102102
private void handleSharedLibraryError(Error e) {
103103
java.util.logging.Logger logger = java.util.logging.Logger.getLogger(Logger.LOGGERNAME);
104-
logger.log(Level.INFO,
105-
SharedResources.getResources().getKString(SharedResources.W_LOGCHANNEL_DISABLED, this.getClass().getName(), e.getMessage()));
104+
logSharedLibraryError(logger, e.getMessage());
106105
open = false;
107106
}
108107

108+
static void logSharedLibraryError(java.util.logging.Logger logger, String errorMessage) {
109+
logger.log(Level.INFO,
110+
SharedResources.getResources().getKString(SharedResources.W_LOGCHANNEL_DISABLED, SysLogHandler.class.getName(), errorMessage));
111+
}
112+
109113
public static void setFacility(int f) {
110114
facility = f;
111115
}

0 commit comments

Comments
 (0)