Package ch.qos.logback.core.pattern

Examples of ch.qos.logback.core.pattern.LiteralConverter


  Converter compile() {
    head = tail = null;
    for (Node n = top; n != null; n = n.next) {
      switch (n.type) {
      case Node.LITERAL:
        addToList(new LiteralConverter((String) n.getValue()));
        break;
      case Node.COMPOSITE:
        CompositeNode cn = (CompositeNode) n;
        CompositeConverter compositeConverter = new CompositeConverter();
        compositeConverter.setFormattingInfo(cn.getFormatInfo());
        Converter childConverter = new Compiler(cn.getChildNode(), converterMap)
            .compile();
        compositeConverter.setChildConverter(childConverter);
        addToList(compositeConverter);
        break;
      case Node.KEYWORD:
        KeywordNode kn = (KeywordNode) n;
        DynamicConverter dynaConverter = createConverter(kn);
        if (dynaConverter != null) {
          dynaConverter.setFormattingInfo(kn.getFormatInfo());
          dynaConverter.setOptionList(kn.getOptions());
          addToList(dynaConverter);
        } else {
          // if the appropriate dynaconverter cannot be found, then replace
          // it with a dummy LiteralConverter indicating an error.
          Converter errConveter = new LiteralConverter("%PARSER_ERROR_"
              + kn.getValue());
          addStatus(new ErrorStatus("["+kn.getValue()+"] is not a valid conversion word", this));
          addToList(errConveter);
        }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.pattern.LiteralConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.