Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*     */ package org.apache.log4j;
 /*     */ 
 /*     */ import org.apache.log4j.helpers.DateLayout;
 /*     */ import org.apache.log4j.spi.LoggingEvent;
 /*     */ 
 /*     */ public class TTCCLayout extends DateLayout
 /*     */ {
 /*  76 */   private boolean threadPrinting = true;
 /*  77 */   private boolean categoryPrefixing = true;
/*  78 */   private boolean contextPrinting = true;
/*     */ 
/*  81 */   protected final StringBuffer buf = new StringBuffer(256);
/*     */ 
/*     */   public TTCCLayout()
/*     */   {
/*  91 */     setDateFormat("RELATIVE"null);
/*     */   }
/*     */ 
/*     */   public TTCCLayout(String dateFormatType)
/*     */   {
/* 104 */     setDateFormat(dateFormatType);
/*     */   }
/*     */ 
/*     */   public void setThreadPrinting(boolean threadPrinting)
/*     */   {
/* 114 */     this. = threadPrinting;
/*     */   }
/*     */ 
/*     */   public boolean getThreadPrinting()
/*     */   {
/* 122 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setCategoryPrefixing(boolean categoryPrefixing)
/*     */   {
/* 131 */     this. = categoryPrefixing;
/*     */   }
/*     */ 
/*     */   public boolean getCategoryPrefixing()
/*     */   {
/* 139 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setContextPrinting(boolean contextPrinting)
/*     */   {
/* 149 */     this. = contextPrinting;
/*     */   }
/*     */ 
/*     */   public boolean getContextPrinting()
/*     */   {
/* 157 */     return this.;
/*     */   }
/*     */ 
/*     */   public String format(LoggingEvent event)
/*     */   {
/* 175 */     this..setLength(0);
/*     */ 
/* 177 */     dateFormat(this.event);
/*     */ 
/* 179 */     if (this.) {
/* 180 */       this..append('[');
/* 181 */       this..append(event.getThreadName());
/* 182 */       this..append("] ");
/*     */     }
/* 184 */     this..append(event.getLevel().toString());
/* 185 */     this..append(' ');
/*     */ 
/* 187 */     if (this.) {
/* 188 */       this..append(event.getLoggerName());
/* 189 */       this..append(' ');
/*     */     }
/*     */ 
/* 192 */     if (this.) {
/* 193 */       String ndc = event.getNDC();
/*     */ 
/* 195 */       if (ndc != null) {
/* 196 */         this..append(ndc);
/* 197 */         this..append(' ');
/*     */       }
/*     */     }
/* 200 */     this..append("- ");
/* 201 */     this..append(event.getRenderedMessage());
/* 202 */     this..append(.);
/* 203 */     return this..toString();
/*     */   }
/*     */ 
/*     */   public boolean ignoresThrowable()
/*     */   {
/* 214 */     return true;
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.apache.log4j.TTCCLayout
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X