Dear all : I use bit modified version of SocketAppender ( NewSocketAppender ); and FileAppender ( NewFileAppender ). Question 1 ) Why is Fallback error not working ... is there something wrong in the file Question 2 ) I want fallback handler for each logger Database; ChannelGatewayLogs; BalanceLog; ConnectURL Although Each write to same SocketAppender; How do I separate then at Fallback Handler level.
Thanks in advance for suggestions and help. Chand <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="A1" class="org.apache.log4j.net.NewSocketAppender"> <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler"> <root-ref /> <appender-ref ref="fallback" /> </errorHandler> <param name="remoteHost" value="172.16.1.215" /> <param name="port" value="5999" /> </appender> <appender name="fallback" class="org.apache.log4j.NewFileAppender"> <param name="File" value="fallback1.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%r [%t] %-5p %c{2} %x - %m%n" /> </layout> </appender> <logger name="com.mmoney.utilities.Database"> <level value="ERROR" /> </logger> <logger name="com.mmoney.common.ChannelGatewayLogs"> <level value="INFO" /> </logger> <logger name="com.mmoney.common.BalanceLog"> <level value="INFO" /> </logger> <logger name="com.mmoney.sms.ConnectURL"> <level value="INFO" /> </logger> <root> <priority value="INFO" /> <appender-ref ref="A1" /> </root> </log4j:configuration> -----Original Message----- From: alekoc [mailto:[email protected]] Sent: Wednesday, February 25, 2009 2:09 AM To: [email protected] Subject: Re: One .log file for two different applications Thank you, Jacob I thought Log4j is reentrant, but it is not. If so, everything is clear. Yes, I put log4j-1.2.14.jar file into Apache\apache-tomcat\lib and tried to use it for all my web applications. An idea was to decrease WAR file sizes. -- View this message in context: http://www.nabble.com/One-.log-file-for-two-different-applications-tp22159737p22190071.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This e-mail and all material transmitted with it are for the use of the intended recipient(s) ONLY and contains confidential and/or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken pursuant to the contents of the present e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Bharti Telesoft Limited or its management or directors, are unable to exercise control or ensure the integrity over /of the contents of the information contained in e-mail. Any views expressed herein are those of the individual sender only and no binding nature of the contents shall be implied or assumed unless the sender does so expressly with due authority of Bharti Telesoft Limited. E-mail and any contents transmitted with it are prone to viruses and related defects despite all efforts to avoid such by Bharti Telesoft Limited. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
