Esempio n. 1
0
    private LogLevelWrapper(LogLevel logLevel) {
      this.logLevel = logLevel;

      String temp =
          logLevel
              .toString()
              .toLowerCase()
              .replace('_', ' '); // replace underscores in the name with spaces
      this.toString = Character.toUpperCase(temp.charAt(0)) + temp.substring(1);

      // add the command line character to the end (so if an error message says use a log level, you
      // can easily translate)
      String commandLineCharacter =
          new LoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
      if (commandLineCharacter != null && !commandLineCharacter.equals("")) {
        this.toString += " (-" + commandLineCharacter + ")";
      }
    }