@Override
    protected String fill(String pattern, long timeMillis, int logLevel, String tag, String message) {
      if (useLongName) {
        return pattern.replace(wrappedParameter, LogLevel.getLevelName(logLevel));
      } else {
        return pattern.replace(wrappedParameter, LogLevel.getShortLevelName(logLevel));
      }
    }
Fill the original pattern string with level name.
xlog/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java