1 16 17 package org.apache.log4j.performance; 18 19 import org.apache.log4j.Layout; 20 import org.apache.log4j.spi.LoggingEvent; 21 import org.apache.log4j.AppenderSkeleton; 22 23 32 public class NullAppender extends AppenderSkeleton { 33 34 public static String s; 35 public String t; 36 37 public 38 NullAppender() {} 39 40 public 41 NullAppender(Layout layout) { 42 this.layout = layout; 43 } 44 45 public 46 void close() {} 47 48 public 49 void doAppend(LoggingEvent event) { 50 if(layout != null) { 51 t = layout.format(event); 52 s = t; 53 } 54 } 55 56 public 57 void append(LoggingEvent event) { 58 } 59 60 63 public 64 boolean requiresLayout() { 65 return true; 66 } 67 } 68 | Popular Tags |