Commit 8754ab98 authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancements.

parent b7dfe927
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2020 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
......@@ -153,11 +153,15 @@ public class TcpProxyService implements TcpProxyServiceMBean {
} else {
serverSocket = new ServerSocket(port, backlog, InetAddress.getByName(address));
}
} catch (Exception exc) {
logger.log(BasicLevel.ERROR,
"TcpProxyService.createServerSocket(" + port + ',' + backlog + ',' + address + ')', exc);
throw exc;
}
} catch (Exception exc) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.ERROR,
"TcpProxyService.createServerSocket(" + port + ',' + backlog + ',' + address + ')', exc);
else
logger.log(BasicLevel.ERROR,
"TcpProxyService.createServerSocket(" + port + ',' + backlog + ',' + address + "): " + exc.getMessage());
throw exc;
}
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "TcpProxyService.createServerSocket serverSocket = " + serverSocket);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment