Tabnine Logo
ch.qos.logback.core.pattern
Code IndexAdd Tabnine to your IDE (free)

How to use ch.qos.logback.core.pattern

Best Java code snippets using ch.qos.logback.core.pattern (Showing top 20 results out of 315)

origin: ch.qos.logback/logback-classic

  /**
   * This method computes whether a chain of converters handles exceptions or
   * not.
   * 
   * @param head
   *                The first element of the chain
   * @return true if can handle throwables contained in logging events
   */
  public boolean chainHandlesThrowable(Converter<ILoggingEvent> head) {
    Converter<ILoggingEvent> c = head;
    while (c != null) {
      if (c instanceof ThrowableHandlingConverter) {
        return true;
      }
      c = c.getNext();
    }
    return false;
  }
}
origin: ch.qos.logback/logback-classic

private void appendEventToBuffer(StringBuilder buf, Converter<ILoggingEvent> c, ILoggingEvent event) {
  buf.append("<td class=\"");
  buf.append(computeConverterName(c));
  buf.append("\">");
  buf.append(Transform.escapeTags(c.convert(event)));
  buf.append("</td>");
  buf.append(LINE_SEPARATOR);
}
origin: ch.qos.logback/logback-classic

Converter<ILoggingEvent> tail = ConverterUtil.findTail(head);
Converter<ILoggingEvent> exConverter = null;
LoggerContext loggerContext = (LoggerContext) context;
  exConverter = new ThrowableProxyConverter();
tail.setNext(exConverter);
origin: camunda/camunda-bpm-platform

/**
 * Start converters in the chain of converters.
 *
 * @param head
 */
public static <E> void startConverters(Converter<E> head) {
 Converter<E> c = head;
 while (c != null) {
  // CompositeConverter is a subclass of  DynamicConverter
  if (c instanceof CompositeConverter) {
   CompositeConverter<E> cc = (CompositeConverter<E>) c;
   Converter<E> childConverter = cc.childConverter;
   startConverters(childConverter);
   cc.start();
  } else if (c instanceof DynamicConverter) {
   DynamicConverter<E> dc = (DynamicConverter<E>) c;
   dc.start();
  }
  c = c.getNext();
 }
}
origin: camunda/camunda-bpm-platform

protected String writeLoopOnConverters(E event) {
 StringBuilder buf = new StringBuilder(128);
 Converter<E> c = head;
 while (c != null) {
  c.write(buf, event);
  c = c.getNext();
 }
 return buf.toString();
}
origin: camunda/camunda-bpm-platform

public String convert(Object o) {
 StringBuilder buf = new StringBuilder();
 Converter<Object> p = headTokenConverter;
 while (p != null) {
  buf.append(p.convert(o));
  p = p.getNext();
 }
 return buf.toString();
}
origin: camunda/camunda-bpm-platform

public String convert(E event) {
 StringBuilder buf = new StringBuilder();
 for (Converter<E> c = childConverter; c != null; c = c.next) {
  c.write(buf, event);
 }
 String intermediary = buf.toString();
 return transform(event, intermediary);
}
origin: camunda/camunda-bpm-platform

public boolean equals(Object o) {
 if (!super.equals(o)) {
  return false;
 }
 if(!(o instanceof FormattingNode)) {
   return false;
 }
 FormattingNode r = (FormattingNode) o;
 return (formatInfo != null ? formatInfo.equals(r.formatInfo)
   : r.formatInfo == null);
}
origin: camunda/camunda-bpm-platform

/**
 *
 * @param head
 * @deprecated  Use {@link ConverterUtil#setContextForConverters} instead. This method will
 *  be removed in future releases.
 */
protected void setContextForConverters(Converter<E> head) {
 ConverterUtil.setContextForConverters(getContext(), head);
}
origin: camunda/camunda-bpm-platform

 @Override
 public int hashCode() {
  int result = super.hashCode();
  result = 31 * result + (formatInfo != null ? formatInfo.hashCode() : 0);
  return result;
 }
}
origin: camunda/camunda-bpm-platform

private void addToList(Converter<E> c) {
 if (head == null) {
  head = tail = c;
 } else {
  tail.setNext(c);
  tail = c;
 }
}
origin: ch.qos.logback/logback-classic

@Override
public void start() {
  PatternLayout patternLayout = new PatternLayout();
  patternLayout.setContext(context);
  patternLayout.setPattern(getPattern());
  patternLayout.setOutputPatternAsHeader(outputPatternAsHeader);
  patternLayout.start();
  this.layout = patternLayout;
  super.start();
}
origin: camunda/camunda-bpm-platform

/**
 * @deprecated replaced by {@link #setOutputPatternAsHeader(boolean)}
 */
public void setOutputPatternAsPresentationHeader(boolean outputPatternAsHeader) {
 addWarn("[outputPatternAsPresentationHeader] property is deprecated. Please use [outputPatternAsHeader] option instead.");
 this.outputPatternAsHeader = outputPatternAsHeader;
}
origin: camunda/camunda-bpm-platform

 @Override
 public String getPresentationHeader() {
  if(outputPatternAsHeader)
   return getPresentationHeaderPrefix()+pattern;
  else
   return super.getPresentationHeader();
 }
}
origin: dropwizard/dropwizard

  protected LayoutBase<E> buildLayout(LoggerContext context, LayoutFactory<E> defaultLayoutFactory) {
    final LayoutBase<E> layoutBase;
    if (layout == null) {
      final PatternLayoutBase<E> patternLayoutBase = defaultLayoutFactory.build(context, timeZone);
      if (!Strings.isNullOrEmpty(logFormat)) {
        patternLayoutBase.setPattern(logFormat);
      }
      layoutBase = patternLayoutBase;
    } else {
      layoutBase = layout.build(context, timeZone);
    }

    layoutBase.start();
    return layoutBase;
  }
}
origin: ch.qos.logback/logback-classic

public String doLayout(ILoggingEvent event) {
  StringBuilder buf = new StringBuilder();
  startNewTableIfLimitReached(buf);
  boolean odd = true;
  if (((counter++) & 1) == 0) {
    odd = false;
  }
  String level = event.getLevel().toString().toLowerCase();
  buf.append(LINE_SEPARATOR);
  buf.append("<tr class=\"");
  buf.append(level);
  if (odd) {
    buf.append(" odd\">");
  } else {
    buf.append(" even\">");
  }
  buf.append(LINE_SEPARATOR);
  Converter<ILoggingEvent> c = head;
  while (c != null) {
    appendEventToBuffer(buf, c, event);
    c = c.getNext();
  }
  buf.append("</tr>");
  buf.append(LINE_SEPARATOR);
  if (event.getThrowableProxy() != null) {
    throwableRenderer.render(buf, event);
  }
  return buf.toString();
}
origin: alibaba/nacos

  break;
c = c.getNext();
origin: camunda/camunda-bpm-platform

public IntegerTokenConverter getIntegerTokenConverter() {
 Converter p = headTokenConverter;
 while (p != null) {
  if (p instanceof IntegerTokenConverter) {
   return (IntegerTokenConverter) p;
  }
  p = p.getNext();
 }
 return null;
}
origin: camunda/camunda-bpm-platform

public static <E> Converter<E> findTail(Converter<E> head) {
 Converter<E> p = head;
 while (p != null) {
  Converter<E> next = p.getNext();
  if (next == null) {
   break;
  } else {
   p = next;
  }
 }
 return p;
}
origin: camunda/camunda-bpm-platform

 public static <E> void setContextForConverters(Context context, Converter<E> head) {
  Converter<E> c = head;
  while (c != null) {
   if (c instanceof ContextAware) {
    ((ContextAware) c).setContext(context);
   }
   c = c.getNext();
  }
 }
}
ch.qos.logback.core.pattern

Most used classes

  • Converter
    A minimal converter which sets up the general interface for derived classes. It also implements the
  • PatternLayoutBase
  • ConverterUtil
  • PatternLayoutEncoderBase
  • DynamicConverter
  • SpacePadder,
  • CompositeNode,
  • FormattingNode,
  • Node,
  • Parser,
  • Token,
  • TokenStream,
  • AlmostAsIsEscapeUtil,
  • CompositeConverter,
  • FormattingConverter,
  • LiteralConverter,
  • PostCompileProcessor,
  • Compiler,
  • OptionTokenizer
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now