hey,guys,
   is there any way to log the detailed warn or error message from my udfs ?  
Apache Pig version 0.8.1-cdh3u1  
   i wrote the udf warn like this:
   
IpRegion region = null;
try {
region = IPAnalyzeSingleton.getInstance().citySeek(ip);
} catch (Exception e) {
warn("invalid ip[" + ip + "],will return -1 .", PigWarning.UDF_WARNING_1);
return -1;
}
   
   after run the script with this command:  pig -4 /tmp/log4j.properties 
test.pig 

   only got the count numbers of the warns,but i meaned to get the detailed 
warn info.
   WARN main 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher 
- Encountered Warning UDF_WARNING_1 9261846 time(s). 

   the log4j configure as follows:
   
log4j.rootLogger=WARN, B

log4j.appender.B = org.apache.log4j.DailyRollingFileAppender
log4j.appender.B.File = /tmp/pig/logs/log.log
log4j.appender.B.DatePattern='.'yyyy-MM-dd
log4j.appender.B.Append = true
log4j.appender.B.Threshold = WARN
log4j.appender.B.layout = org.apache.log4j.PatternLayout
log4j.appender.B.layout.ConversionPattern = %p %t %c - %m%n




lucas 

Reply via email to