I've written a bit more robust example at https://svn.apache.org/repos/asf/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/. The appender can be configured with a list of agents instead of just one. The Manager handles the actual communication and FlumeEvent handles the conversion from a Log4j2 event to a Flume event.
Ralph On Oct 5, 2011, at 6:46 AM, Erik Forsberg wrote: > On Wed, 5 Oct 2011 15:42:43 +0200 > Erik Forsberg <forsb...@opera.com> wrote: > >> Have a look at the source catalog: >> >> http://archive.cloudera.com/cdh/3/flume/UserGuide/index.html#_flume_source_catalog >> >> There's the rpcsource, which allows you to use Thrift or Avro to >> connect from your java program to the node and deliver messages. But I >> don't have any simple example on how to use it handy. > > Actually, when I look at it a bit closer, the log4j appender source > code should serve as an example of how to communicate via Avro from > your Java program: > > https://github.com/cloudera/flume/blob/master/flume-log4j-appender/src/main/java/com/cloudera/flume/log4j/appender/FlumeLog4jAvroAppender.java > > \EF > -- > Erik Forsberg <forsb...@opera.com> > Developer, Opera Software - http://www.opera.com/