logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject socketappender stacktrace, is it necessary?
Date Fri, 07 May 2004 15:40:50 GMT

Hi everyone,

I've been using Chainsaw2 and like it quite a bit (nice work guys!).  However,
the socketappender, at least in Logj4-1.2.8, prints out a big stack trace if
nothing is listening to the socket it is appending to.  Wouldn't a simple
warning suffice?  In fact, I'd report it as a "WARN" rather than an "ERROR".  A
user can determine whether or not they want to view log messages being appended
to the socket and really only need to be gently reminded of the lack of the
socket listener.  It's not like the app won't work anymore which is what one
might think after seeing "ERROR" and a huge scary stack trace.  Below is what I
see even when I'm not concerned with viewing logging.  Do you think this is
necessary to have in the server logs?  How about: "log4j:WARN No socket listener
at localhost:4445 to recieve socket appender messages. We will try again later"
with no stack trace (I apologize if this is already fixed in 1.3.  I haven't had
a chance to look; at work with no CVS access)....


log4j:ERROR Could not connect to remote log4j server at [localhost]. We will try
again later.
java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.apache.log4j.net.SocketAppender.connect(SocketAppender.java:195)
	at org.apache.log4j.net.SocketAppender.activateOptions(SocketAppender.java:152)
	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
	at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:210)
	at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
	at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
	at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
	at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335)
	at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)
	at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:687)
	at
org.apache.log4j.servlet.InitShutdownController.initializeLog4j(InitShutdownController.java:215)
	at
org.apache.log4j.servlet.InitContextListener.contextInitialized(InitContextListener.java:265)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3805)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
	at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
	at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
	at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:813)
	at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:320)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
	at java.lang.Thread.run(Unknown Source)


Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message