svn commit: r2381 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper

Author: ceki Date: Thu Jul 30 18:09:05 2009 New Revision: 2381 Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java Log: Remove fluff (commented-out code) Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java ============================================================================== --- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java (original) +++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java Thu Jul 30 18:09:05 2009 @@ -67,107 +67,6 @@ return pattern; } - // void parsex() { - // int lastIndex = 0; - // - // TokenConverter tc = null; - // - // MAIN_LOOP: while (true) { - // int i = pattern.indexOf('%', lastIndex); - // - // if (i == -1) { - // String remainingStr = pattern.substring(lastIndex); - // - // // System.out.println("adding the identity token, I"); - // addTokenConverter(tc, new IdentityTokenConverter(remainingStr)); - // - // break; - // } else { - // // test for degenerate case where the '%' character is at the end. - // if (i == (patternLength - 1)) { - // String remainingStr = pattern.substring(lastIndex); - // addTokenConverter(tc, new IdentityTokenConverter(remainingStr)); - // - // break; - // } - // - // // System.out.println("adding the identity token, II"); - // tc = addTokenConverter(tc, new IdentityTokenConverter(pattern - // .substring(lastIndex, i))); - // - // // At this stage, we can suppose that i < patternLen -1 - // char nextChar = pattern.charAt(i + 1); - // - // switch (nextChar) { - // case 'i': - // tc = addTokenConverter(tc, new IntegerTokenConverter()); - // lastIndex = i + 2; - // - // break; // break from switch statement - // - // case 'd': - // - // int optionEnd = getOptionEnd(i + 2); - // - // String option; - // - // if (optionEnd != -1) { - // option = pattern.substring(i + 3, optionEnd); - // lastIndex = optionEnd + 1; - // } else { - // addInfo("Assuming daily rotation schedule"); - // option = "yyyy-MM-dd"; - // lastIndex = i + 2; - // } - // tc = addTokenConverter(tc, new DateTokenConverter(option)); - // break; // break from switch statement - // - // case '%': - // tc = addTokenConverter(tc, new IdentityTokenConverter("%")); - // lastIndex = i + 2; - // - // break; - // - // default: - // throw new IllegalArgumentException("The pattern[" + pattern - // + "] does not contain a valid specifer at position " + (i + 1)); - // } - // } - // } - // } - // - // /** - // * Find the position of the last character of option enclosed within the - // '{}' - // * characters inside the pattern - // */ - // protected int getOptionEnd(int i) { - // // logger.debug("Char at "+i+" "+pattern.charAt(i)); - // if ((i < patternLength) && (pattern.charAt(i) == '{')) { - // int end = pattern.indexOf('}', i); - // - // if (end > i) { - // return end; - // } else { - // return -1; - // } - // } - // - // return -1; - // } - // - // TokenConverter addTokenConverter(TokenConverter tc, - // TokenConverter newTokenConverter) { - // if (tc == null) { - // tc = headTokenConverter = newTokenConverter; - // } else { - // tc.next = newTokenConverter; - // tc = newTokenConverter; - // } - // - // return tc; - // } - public DateTokenConverter getDateTokenConverter() { Converter p = headTokenConverter;
participants (1)
-
noreply.ceki@qos.ch