1 16 17 package org.apache.log4j; 18 19 import org.apache.log4j.spi.OptionHandler; 20 import org.apache.log4j.spi.LoggingEvent; 21 22 28 29 public abstract class Layout implements OptionHandler { 30 31 public final static String LINE_SEP = System.getProperty("line.separator"); 34 public final static int LINE_SEP_LEN = LINE_SEP.length(); 35 36 37 40 abstract 41 public 42 String format(LoggingEvent event); 43 44 48 public 49 String getContentType() { 50 return "text/plain"; 51 } 52 53 56 public 57 String getHeader() { 58 return null; 59 } 60 61 64 public 65 String getFooter() { 66 return null; 67 } 68 69 70 71 82 abstract 83 public 84 boolean ignoresThrowable(); 85 86 } 87 | Popular Tags |