Package org.apache.log4j.helpers

Examples of org.apache.log4j.helpers.PatternConverter


    public PatternParser(String pattern) {
        super(pattern);
    }

    protected void finalizeConverter(char c) {
        PatternConverter pc = null;
        switch (c) {
            case 'a':
                String key = extractOption();
                pc = new NamedNDCConverter(formattingInfo, key);
                currentLiteral.setLength(0);
View Full Code Here


    public PatternParser(String pattern) {
        super(pattern);
    }

    protected void finalizeConverter(char c) {
        PatternConverter pc = null;
        switch (c) {
            case 'a':
                String key = extractOption();
                pc = new NamedNDCConverter(formattingInfo, key);
                currentLiteral.setLength(0);
View Full Code Here

      super(pattern);
   }

   protected void finalizeConverter(char c)
   {
      PatternConverter pc = null;
      switch(c)
      {
         case 'z':
            pc = new ThreadNDCConverter(formattingInfo);
            currentLiteral.setLength(0);
View Full Code Here

        public TenantAwarePatternParser(String pattern) {
            super(pattern);
        }

        protected void finalizeConverter(char c) {
            PatternConverter pc = null;
            switch (c) {
                case 'D':
                    pc = new TenantDomainPatternConverter(formattingInfo, extractPrecisionOption());
                    break;
                case '@':
View Full Code Here

      sbuf = new StringBuffer(BUF_SIZE);
    } else {
      sbuf.setLength(0);
    }
   
    PatternConverter c = head;

    while(c != null) {
      c.format(sbuf, event);
      c = c.next;
    }
    return sbuf.toString();
  }
View Full Code Here

        super(pattern);
    }
   
    public void finalizeConverter (char formatChar)
    {
        PatternConverter pc = null;
       
        switch(formatChar)
        {
          case CUSTOMTAG_CHAR:
            pc = new CustomTagPatternConverter(formattingInfo);
View Full Code Here

    public PatternParser(String pattern) {
        super(pattern);
    }

    protected void finalizeConverter(char c) {
        PatternConverter pc = null;
        switch (c) {
            case 'a':
                String key = extractOption();
                pc = new NamedNDCConverter(formattingInfo, key);
                currentLiteral.setLength(0);
View Full Code Here

        } else
        {
            builder.setLength(0);
        }

        PatternConverter c = headConverter;

        while (c != null)
        {
            if (buf.capacity() > MAX_CAPACITY)
            {
                buf = new StringBuffer(BUF_SIZE);
            } else
            {
                buf.setLength(0);
            }
            c.format(buf, event);

            // Escape double quotes in String generated by converters other than
            // a LiteralPatternConverter. Can't use "instance of" because class
            // is private.
            if (c.getClass().getSimpleName().equals("LiteralPatternConverter"))
            {
                builder.append(buf);
            } else
            {
                char[] chars = buf.toString().toCharArray();
View Full Code Here

     *
     * @see org.apache.log4j.helpers.PatternParser#finalizeConverter(char)
     */
    public void finalizeConverter(char formatChar)
    {
        PatternConverter pc = null;
        switch (formatChar)
        {
        case EXTRA_CHAR:
            pc = new ExtraInfoPatternConverter(formattingInfo);
            currentLiteral.setLength(0);
View Full Code Here

    public PatternParser(String pattern) {
        super(pattern);
    }

    protected void finalizeConverter(char c) {
        PatternConverter pc = null;
        switch (c) {
            case 'a':
                String key = extractOption();
                pc = new NamedNDCConverter(formattingInfo, key);
                currentLiteral.setLength(0);
View Full Code Here

TOP

Related Classes of org.apache.log4j.helpers.PatternConverter

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.