package com.cloudera.flume.handlers.log4j;
import java.io.IOException;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.spi.LoggingEvent;
import com.cloudera.flume.core.EventSink;
EventSink sink;
}
this.sink = sink;
}
assert (sink != null);
this.sink = sink;
}
return sink;
}
@Override
protected void append(LoggingEvent event) {
try {
sink.append(new Log4JEventAdaptor(event));
} catch (IOException e) {
throw new RuntimeException("TODO, log event IO exception");
}
}
try {
sink.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return false;
}
}