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

Switch to Threaded View
Flume >> mail # dev >> Re: regarding flume


Copy link to this message
-
Re: regarding flume
You might consider looking at Log4j 2. It will format the message according to the layout and store it in the body. It will also store the MDC in event variables if desired. However, using it will require that you switch from Log4j 1.2 to Log4j 2. See http://logging.apache.org/log4j/2.x/manual/appenders.html#FlumeAvroAppender. Log4j 2 is still waiting for its first release ( which should happen any day) so you will have to build it yourself if you want to try it.

Ralph

On Jul 28, 2012, at 5:49 PM, thamatam Jayaprakash <[EMAIL PROTECTED]> wrote:

> Hi All,
>
> Im working on Flume 1.1.0 and 1.2.0 . We are not able set log pattern and
> We are using log4jappender
> log4j.appender.flume=org.apache.flume.clients.log4jappender.Log4jAppender
>
> but we are getting plain test
>
> *Example if i log following mssages :*
>
> 17:42:55,928  INFO SimpleJdbcServlet:69 - doGet of SimpleJdbcServlet
> ended...
> 17:43:03,489  INFO HelloServlet:29 - HelloServlet of doGet started...
> 17:43:03,489  INFO HelloServlet:33 -
> Hello from Simple Servlet
> 17:43:03,489  INFO HelloServlet:35 - HelloServlet of doGet end...
> 17:47:46,000  INFO HelloServlet:29 - HelloServlet of doGet started...
> 17:47:46,001  INFO HelloServlet:33 -
> Hello from Simple Servlet
> 17:47:46,001  INFO HelloServlet:35 - HelloServlet of doGet end...
>
> *Using Flume in Hadoop im getting only the following logs:*
>
> doGet of SimpleJdbcServlet ended...
> HelloServlet of doGet started...
>
> HelloServlet of doGet end...
> HelloServlet of doGet started...
>
> *Please suggest me which log appender need to use for custom logging
> pattern and appender.
>
> Thanks in advance.
> *
> -- JP