Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Flume >> mail # dev >> Log42 embedded Flume agent fails to rollback (log4j2-278)


+
Edward Sargisson 2013-06-10, 22:31
+
Hari Shreedharan 2013-06-10, 22:55
Copy link to this message
-
Re: Log42 embedded Flume agent fails to rollback (log4j2-278)
I am a bit confused.  At line 566 Log calls SLF4J so you will only end up back in Log4j 2 if you have made Log4j 2 the SLF4J implementation. That shouldn't cause any problems. Having Flume (or any other code such as Hibernate) attempt to log from inside an Appender is expected and would be detected and the logging call would be ignored if it is made on the same thread.  However, if the work is being done on a second thread it would not appear to be a recursive call.

The simple solution for this is to configure a Logger for org.apache.flume and do not allow it to be routed to the FlumeAppender.

Ralph
On Jun 10, 2013, at 3:31 PM, Edward Sargisson wrote:

> Hi all,
> I have discovered a defect in the way the Log4j2 embedded Flume agent works. As it is an interaction between the two code bases I am taking the liberty of making both teams aware of it by cross-posting to both dev lists.
>
> The summary is that, during a rollback, Flume's org.apache.flume.channel.file.Log calls the logging subsystem at line 566. This recursive call causes problems. There are other places where logging is called which cause similar problems.
>
> Details: https://issues.apache.org/jira/browse/LOG4J2-278
>
> Cheers,
> Edward
>
>

+
Edward Sargisson 2013-06-11, 16:39