@Test public void loggerNameWithNoDots_WithNoSetLevel() { SimpleLogger simpleLogger = new SimpleLogger("x"); assertNull(simpleLogger.recursivelyComputeLevelString()); }
String recursivelyComputeLevelString() { String tempName = name; String levelString = null; int indexOfLastDot = tempName.length(); while ((levelString == null) && (indexOfLastDot > -1)) { tempName = tempName.substring(0, indexOfLastDot); levelString = CONFIG_PARAMS.getStringProperty(SimpleLogger.LOG_KEY_PREFIX + tempName, null); indexOfLastDot = String.valueOf(tempName).lastIndexOf("."); } return levelString; }
SimpleLogger extends LegacyAbstractLogger { String recursivelyComputeLevelString() { String tempName = name; String levelString = null; int indexOfLastDot = tempName.length(); while ((levelString == null) && (indexOfLastDot > -1)) { tempName = tempName.substring(0, indexOfLastDot); levelString = CONFIG_PARAMS.getStringProperty(SimpleLogger.LOG_KEY_PREFIX + tempName, null); indexOfLastDot = String.valueOf(tempName).lastIndexOf("."); } return levelString; } }
SimpleLogger extends LegacyAbstractLogger { String recursivelyComputeLevelString() { String tempName = name; String levelString = null; int indexOfLastDot = tempName.length(); while ((levelString == null) && (indexOfLastDot > -1)) { tempName = tempName.substring(0, indexOfLastDot); levelString = CONFIG_PARAMS.getStringProperty(SimpleLogger.LOG_KEY_PREFIX + tempName, null); indexOfLastDot = String.valueOf(tempName).lastIndexOf("."); } return levelString; } SimpleLogger(String name); }
SimpleLogger extends LegacyAbstractLogger { String recursivelyComputeLevelString() { String tempName = name; String levelString = null; int indexOfLastDot = tempName.length(); while ((levelString == null) && (indexOfLastDot > -1)) { tempName = tempName.substring(0, indexOfLastDot); levelString = CONFIG_PARAMS.getStringProperty(SimpleLogger.LOG_KEY_PREFIX + tempName, null); indexOfLastDot = String.valueOf(tempName).lastIndexOf("."); } return levelString; } SimpleLogger(String name); boolean isTraceEnabled(); boolean isDebugEnabled(); boolean isInfoEnabled(); boolean isWarnEnabled(); boolean isErrorEnabled(); void log(LoggingEvent event); }
SimpleLogger extends LegacyAbstractLogger { String recursivelyComputeLevelString() { String tempName = name; String levelString = null; int indexOfLastDot = tempName.length(); while ((levelString == null) && (indexOfLastDot > -1)) { tempName = tempName.substring(0, indexOfLastDot); levelString = CONFIG_PARAMS.getStringProperty(SimpleLogger.LOG_KEY_PREFIX + tempName, null); indexOfLastDot = String.valueOf(tempName).lastIndexOf("."); } return levelString; } SimpleLogger(String name); boolean isTraceEnabled(); boolean isDebugEnabled(); boolean isInfoEnabled(); boolean isWarnEnabled(); boolean isErrorEnabled(); void log(LoggingEvent event); static final String SYSTEM_PREFIX; static final String LOG_KEY_PREFIX; static final String CACHE_OUTPUT_STREAM_STRING_KEY; static final String WARN_LEVEL_STRING_KEY; static final String LEVEL_IN_BRACKETS_KEY; static final String LOG_FILE_KEY; static final String SHOW_SHORT_LOG_NAME_KEY; static final String SHOW_LOG_NAME_KEY; static final String SHOW_THREAD_NAME_KEY; static final String DATE_TIME_FORMAT_KEY; static final String SHOW_DATE_TIME_KEY; static final String DEFAULT_LOG_LEVEL_KEY; }