Skip to content

Commit

Permalink
Correct logging of exceptions (https://issues.jboss.org/browse/JGRP-1757
Browse files Browse the repository at this point in the history
)
  • Loading branch information
belaban committed Dec 20, 2013
1 parent 9f7c741 commit d1802f4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 26 deletions.
14 changes: 7 additions & 7 deletions conf/jg-messages.properties
Expand Up @@ -16,17 +16,17 @@ Deprecated = JGRP000014: %s has been deprecated: %s
IncorrectBufferSize = JGRP000015: the %s buffer of socket %s was set to %s, but the OS only allocated %s. \
This might lead to performance problems. Please set your max %s buffer in the OS correctly (e.g. %s on Linux)
CallbackException = JGRP000016: exception in %s callback: %s
DisconnectFailure = JGRP000017: disconnect failed: %s
UpHandlerFailure = JGRP000018: failed passing message to up-handler: %s
ReceiverFailure = JGRP000019: failed passing message to receiver: %s
StackDestroyFailure = JGRP000020: failed destroying the protocol stack: %s
DisconnectFailure = JGRP000017: %s: disconnect failed: %s
UpHandlerFailure = JGRP000018: failed passing message to up-handler
ReceiverFailure = JGRP000019: failed passing message to receiver
StackDestroyFailure = JGRP000020: failed destroying the protocol stack
OperationInvocationFailure = JGRP000021: failed invoking operation %s: %s
FieldNotFound = JGRP000022: Field %s not found in protocol %s
MethodNotFound = JGRP000023: %s: method %s.%s() not found
ParseFailure = JGRP000024: warning during parse: %s
ParseFailure = JGRP000024: warning during parse
SyspropFailure = JGRP000025: failed getting system property for %s: %s
OnlyLoopbackFound = JGRP000026: unable to find an address other than loopback for IP version %s
PassUpFailure = JGRP000027: failed passing message up: %s
PassUpFailure = JGRP000027: failed passing message up
UnknownBundler = JGRP000028: bundler_type %s not known; using default bundler (new3)
SendFailure = JGRP000029: %s: failed sending message to %s (%d bytes): %s, headers: %s
IncomingMsgFailure = JGRP000030: %s: failed handling incoming message: %s
Expand All @@ -49,6 +49,6 @@ OldBundlerType = JGRP000046: bundler_type=%s has been removed; usin
TrafficClass = JGRP000047: traffic class of %d could not be set, will be ignored: %s
InterfaceJoinFailed = JGRP000048: Could not join %s on interface %s
BufferSizeFailed = JGRP000049: failed setting %s buffer size of %d in %s: %s
CompressionFailure = JGRP000050: exception on uncompression: %s
CompressionFailure = JGRP000050: exception on uncompression
RSVP_Misconfig = JGRP000051: resend_interval (%d) is >= timeout (%d); setting resend_interval to timeout / 3
RSVP_Timeout = JGRP000052: message ran into a timeout, missing acks: %s
16 changes: 8 additions & 8 deletions conf/jg-messages_de.properties
Expand Up @@ -15,11 +15,11 @@ SuppressMsg = (%d identische Nachrichten erhalten von %s in den
Deprecated = JGRP000014: %s wird nicht mehr unterstuetzt: %s
IncorrectBufferSize = JGRP000015: Der %s Puffer des Sockets %s wurde auf %s gesetzt, aber das Betriebssystem stellt nur %s zur Verfuegung. \
Dies koennte zu Performanzproblemen fuehren. Bitte setzen Sie den max %s Puffer im Betriebssystem korrekt (z.B. %s unter Linux)
MethodNotFound=JGRP000023\: %s\: Methode %s.%s() nicht gefunden
CallbackException=JGRP000016\: Fehler im %s Callback\: %s
DisconnectFailure=JGRP000017\: Problem in disconnect\: %s
FieldNotFound=JGRP000022\: Feld %s nicht gefunden in Protokoll %s
OperationInvocationFailure=JGRP000021\: Fehler beim Aufruf der Operation %s\: %s
ReceiverFailure=JGRP000019\: Fehler beim Uebergeben der Nachricht an den Empfaenger\: %s
StackDestroyFailure=JGRP000020\: Fehler beim Zerstoeren des Protokoll-Stacks\: %s
UpHandlerFailure=JGRP000018\: Fehler beim Uebergeben der Nachricht an den Up-Handler\: %s
MethodNotFound=JGRP000023: %s: Methode %s.%s() nicht gefunden
CallbackException=JGRP000016: Fehler im %s Callback: %s
DisconnectFailure=JGRP000017: %s: Problem in disconnect: %s
FieldNotFound=JGRP000022: Feld %s nicht gefunden in Protokoll %s
OperationInvocationFailure=JGRP000021: Fehler beim Aufruf der Operation %s: %s
ReceiverFailure=JGRP000019: Fehler beim Uebergeben der Nachricht an den Empfaenger
StackDestroyFailure=JGRP000020: Fehler beim Zerstoeren des Protokoll-Stacks
UpHandlerFailure=JGRP000018: Fehler beim Uebergeben der Nachricht an den Up-Handler
2 changes: 1 addition & 1 deletion src/org/jgroups/JChannel.java
Expand Up @@ -362,7 +362,7 @@ public synchronized void disconnect() {
down(new Event(Event.DISCONNECT, local_addr)); // DISCONNECT is handled by each layer
}
catch(Throwable t) {
log.error(Util.getMessage("DisconnectFailure"), t);
log.error(Util.getMessage("DisconnectFailure"), local_addr, t);
}
}
state=State.OPEN;
Expand Down
3 changes: 1 addition & 2 deletions src/org/jgroups/blocks/BasicConnectionTable.java
Expand Up @@ -322,8 +322,7 @@ public void send(Address dest, byte[] data, int offset, int length) throws Excep
conn.send(data, offset, length);
}
catch(Throwable ex) {
if(log.isTraceEnabled())
log.trace("sending msg to " + dest + " failed (" + ex.getClass().getName() + "); removing from connection table", ex);
log.trace("sending msg to " + dest + " failed (" + ex.getClass().getName() + "); removing from connection table", ex);
removeConnection(dest);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/org/jgroups/blocks/Cache.java
Expand Up @@ -252,8 +252,7 @@ private void notifyChangeListeners() {
l.changed();
}
catch(Throwable t) {
if(log.isErrorEnabled())
log.error("failed notifying change listener", t);
log.error("failed notifying change listener", t);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/jgroups/blocks/ConnectionTableNIO.java
Expand Up @@ -624,7 +624,7 @@ protected ServerSocket createServerSocket(int start_port, int end_port) throws E
}
catch (IOException io_ex)
{
if (log.isErrorEnabled()) log.error("Attempt to bind serversocket failed, port="+start_port+", bind addr=" + bind_addr ,io_ex);
log.error("Attempt to bind serversocket failed, port="+start_port+", bind addr=" + bind_addr ,io_ex);
throw io_ex;
}
srv_port = start_port;
Expand Down
3 changes: 1 addition & 2 deletions src/org/jgroups/blocks/TCPConnectionMap.java
Expand Up @@ -250,8 +250,7 @@ protected void setSocketParameters(Socket client_sock) throws SocketException {
client_sock.setReceiveBufferSize(recv_buf_size);
}
catch(IllegalArgumentException ex) {
if(log.isErrorEnabled())
log.error(local_addr + ": exception setting receive buffer size to " + send_buf_size + " bytes", ex);
log.error(local_addr + ": exception setting receive buffer size to " + send_buf_size + " bytes", ex);
}

client_sock.setKeepAlive(true);
Expand Down
4 changes: 1 addition & 3 deletions src/org/jgroups/protocols/Executing.java
Expand Up @@ -821,9 +821,7 @@ protected void handleExceptionResponse(Address source, long requestId, Throwable
// All we can do is log the error since their is no
// way to return this to the user since they don't
// have a future object.
log.error("Runtime Error encountered from "
+ "Cluster execute(Runnable) method",
throwable);
log.error("Runtime Error encountered from cluster execute(Runnable) method", throwable);
}
}

Expand Down

0 comments on commit d1802f4

Please sign in to comment.