https://issues.apache.org/bugzilla/show_bug.cgi?id=57002
Bug ID: 57002 Summary: SocketAppender freezes for about 15 seconds if the server is not available Product: Log4j Version: 1.2.17 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Appender Assignee: log4j-dev@logging.apache.org Reporter: keitai.1...@gmail.com I am using the SocketAppender to log the execution of scripts (short-lived Java applications that fire some actions and die a few seconds later). I log the activity of those scripts in files but I also want to send logs to Chainsaw, if there is a Chainsaw running. The problem is that if there is no Chainsaw running, the SocketAppender takes some 15 seconds in the connect() method. The result is that my script takes 15 seconds waiting for a Chainsaw that does not exist and then some 4 seconds to actually run. Debug showed that the SocketAppender is taking 10 seconds on address.getHostName(), in the following line: http://grepcode.com/file/repo1.maven.org/maven2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketAppender.java#230 This is just an error log and in this case I do not care about such error, since logs are already going to a FileAppender. So my suggestion is that the SocketAppender should have a new property to turn off those error messages if they are not needed, as they may hurt performance. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org