logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harper, Allen \(AHARPER\)" <AHAR...@arinc.com>
Subject FallbackErrorHandler hangs up thread
Date Thu, 03 Mar 2005 16:40:38 GMT
I posted the message below, and as of yet have not received any
response. I'm on critical path on a huge design and would appreciate any
input soon.

Thanks very much Al Harper

I have added the FallbackErrorHandler in my XML config for failover if
the JDBC appender fails.

The JDBC appender is under control of the ASYNC appender.

In my test I deliberately shutdown MySQL to cause DB access failure.
FallbackErrorHandler does pick up on the failure and attempts to switch
over. Unfortunately in the error routine when the following line is
called the thread locks indefinitely. I can't seem to even step into it.


Has anyone else run into this problem? Below is my XML config for
review. I urgently need this resolved and would appreciate any help.

Thanks Al Harper

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
	<!-- =================Appenders for CSF=================-->
	<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
		<param name="BufferSize" value="1"/>
		<appender-ref ref="CSF_JDBC"/>
	<appender name="CSF_FILE"
		<param name="Threshold" value="DEBUG"/>
		<param name="File"
		<param name="Append" value="true"/>
		<param name="MaxFileSize" value="500KB"/>
		<param name="MaxBackupIndex" value="1"/>
		<layout class="org.apache.log4j.HTMLLayout"/>
	<appender name="CSF_JDBC"
 	    <logger-ref ref="PlatformImpl"/>
 	    <appender-ref ref="CSF_FILE"/>
		<param name="BufferSize" value="1"/>
		<param name="Threshold" value="DEBUG"/>
		<param name="driver" value="com.mysql.jdbc.Driver"/>
		<param name="URL"
		<param name="user" value="aharper"/>
		<param name="password" value="aharper"/>
		<param name="sql" value="insert into %X{table} (id,
cor_key, date, fileName, lineNumber, message) values (0, '%X{key}',
'%d', '%F', '%L', '%m')"/>
	<appender name="CONSOLE"
		<param name="Target" value="System.out"/>
		<param name="Threshold" value="DEBUG"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d, %F,
%L, %m%n"/>
	<logger name="PlatformImpl">
		<level value="DEBUG"/>
		<appender-ref ref="ASYNC"/>
<!--		<appender-ref ref="CSF_FILE"/>   -->
		<appender-ref ref="CONSOLE"/>
		<level value="DEBUG"/>
		<appender-ref ref="ASYNC"/>
		<appender-ref ref="CSF_FILE"/>
		<appender-ref ref="CONSOLE"/>

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

View raw message