code: public static int toInteger(LogLevel level) {
  		if (level == LogLevel.Fatal)
  			return 1;
  		if (level == LogLevel.Error)
  			return 2;
  		if (level == LogLevel.Warn)
  			return 3;
  		if (level == LogLevel.Info)
  			return 4;
  		if (level == LogLevel.Debug)
  			return 5;
  		if (level == LogLevel.Trace)
  			return 6;
  		return 0;
  	}
docs: Converts log level to a number.
  
  @param level a log level to convert.
  @return log level number value.