Thank you for your reply it really helped. From: Sreepathi [mailto:[email protected]] Sent: Friday, December 28, 2012 1:23 AM To: [email protected] Subject: Re: Integration with log4j
Hi, Here RecordType is used just as a type name for the data. For example, if you are configuring namenode logs, then recordtype would be namenode,(recordType=Namenode) if you are configuring datanode logs here, it would be datanode (recordType=Datanode), etc., Basically, its a convenience to identify your data. btw, you should configure the log4j.properties in key=value format( as shown below and its more readable). I'm not sure if space delimiters are allowed for key,value pairs. log4j.rootLogger=INFO, chukwa log4j.appender.chukwa=org.apache.hadoop.chukwa.inputtools.log4j.ChukwaDailyRollingFileAppender<http://wiki.apache.org/hadoop/ChukwaDailyRollingFileAppender> log4j.appender.chukwa.File=${CHUKWA_HOME}/logs/${RECORD_TYPE}.log log4j.appender.chukwa.DatePattern<http://wiki.apache.org/hadoop/DatePattern>='.'yyyy-MM-dd log4j.appender.chukwa.recordType=${RECORD_TYPE} log4j.appender.chukwa.layout=org.apache.log4j.PatternLayout<http://wiki.apache.org/hadoop/PatternLayout> log4j.appender.chukwa.layout.ConversionPattern<http://wiki.apache.org/hadoop/ConversionPattern>=%d{ISO8601} %p %c: %m%n Regards, - Sreepathi. On Thu, Dec 27, 2012 at 1:26 AM, NehaS Singh <[email protected]<mailto:[email protected]>> wrote: Hi, I am trying to collect logs from log4j.i have added the chukwa-0.5.0-client.jar file to Class path I am following the instructions given on this site http://wiki.apache.org/hadoop/Sending_information_to_Chukwa My Problem is whenever a run java program to create log files that is using log4j properties of apache log4j it throws error Record_Type not defined 1. Create a log4j.properties file that contains the following information: * log4j.rootLogger=INFO, chukwa log4j.appender.chukwa=org.apache.hadoop.chukwa.inputtools.log4j.ChukwaDailyRollingFileAppender<http://wiki.apache.org/hadoop/ChukwaDailyRollingFileAppender> log4j.appender.chukwa.File=${CHUKWA_HOME}/logs/${RECORD_TYPE}.log log4j.appender.chukwa.DatePattern<http://wiki.apache.org/hadoop/DatePattern>='.'yyyy-MM-dd log4j.appender.chukwa.recordType=${RECORD_TYPE} log4j.appender.chukwa.layout=org.apache.log4j.PatternLayout<http://wiki.apache.org/hadoop/PatternLayout> log4j.appender.chukwa.layout.ConversionPattern<http://wiki.apache.org/hadoop/ConversionPattern>=%d{ISO8601} %p %c: %m%n 1. Add these parameters to your java command line: * -DCHUKWA_HOME=${CHUKWA_HOME} -DRECORD_TYPE=<YourRecordType<http://wiki.apache.org/hadoop/YourRecordType>_Here> -Dlog4j.configuration=log4j.properties What should I pass in place of Record_type ? Please help Regards, Neha Singh ________________________________ The contents of this e-mail and any attachment(s) may contain confidential or privileged information for the intended recipient(s). Unintended recipients are prohibited from taking action on the basis of information in this e-mail and using or disseminating the information, and must notify the sender and delete it from their system. L&T Infotech will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in this e-mail" -- Regards, -- Sreepathi
