Search in sources :

Example 6 with AppenderProvider

use of org.ow2.proactive.scheduler.common.util.logforwarder.AppenderProvider in project scheduling by ow2-proactive.

the class TaskLogger method getStoredLogs.

public void getStoredLogs(AppenderProvider logSink) {
    Appender appender;
    try {
        appender = logSink.getAppender();
    } catch (LogForwardingException e) {
        logger.error("Cannot create log appender.", e);
        return;
    }
    taskLogAppender.appendStoredEvents(appender);
}
Also used : Appender(org.apache.log4j.Appender) FileAppender(org.apache.log4j.FileAppender) LogForwardingException(org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingException)

Aggregations

Appender (org.apache.log4j.Appender)3 AppenderProvider (org.ow2.proactive.scheduler.common.util.logforwarder.AppenderProvider)3 LogForwardingException (org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingException)3 StringWriter (java.io.StringWriter)2 FileAppender (org.apache.log4j.FileAppender)2 PatternLayout (org.apache.log4j.PatternLayout)2 WriterAppender (org.apache.log4j.WriterAppender)2 Test (org.junit.Test)2 JobIdImpl (org.ow2.proactive.scheduler.job.JobIdImpl)2 LoggingEvent (org.apache.log4j.spi.LoggingEvent)1 InternalException (org.ow2.proactive.scheduler.common.exception.InternalException)1 UnknownJobException (org.ow2.proactive.scheduler.common.exception.UnknownJobException)1 JobResult (org.ow2.proactive.scheduler.common.job.JobResult)1 TaskResult (org.ow2.proactive.scheduler.common.task.TaskResult)1 TaskLauncher (org.ow2.proactive.scheduler.task.TaskLauncher)1