Adds level to be treated specially by this formatter.

@param level level to be added to the special list
@param id one character id to use for this level. If it's <code>null</code> first character of the level name will be used
966310
public static void addCustomLevel(Level level, String id) {
        if (level == null) {
            throw new IllegalArgumentException("Parameter level can not be 'null' in this call");
        }
        if (id == null) {
            id = level.getName().substring(0, 1);
        }
        customLevels.put(level, id);
    }
1371753
@Deprecated
    public void setMinLevel(String minLevel) {
        this.minLevel = minLevel != null ? Level.toLevel(minLevel) : null;
    }
329616
private static void validateId(String id) {

        if (id == null) {
            return;
        }
        int n = id.length();
        if (n < 1) {
            throw new IllegalArgumentException("Empty id attribute is not allowed");
        }
        for (int i = 0; i < n; i++) {
            char c = id.charAt(i);
            if (i == 0) {
                if (!Character.isLetter(c) && (c != '_')) {
                    throw new IllegalArgumentException(id);
                }
            } else {
                if (!Character.isLetter(c) &&
                        !Character.isDigit(c) &&
                        (c != '-') && (c != '_')) {
                    throw new IllegalArgumentException(id);
                }
            }
        }

    }
1019554
private void pushLevel(final Mode mode) {
        JsonLevel newJsonLevel = null;

        if (mode == Mode.BOM) {
            newJsonLevel = new JsonLevel(mode, new JsonPointer()); //not a valid nesting level
        } else if (mode == Mode.JSON_OBJECT) {
            if (levelStack.size() > 0) {
                JsonLevel current = levelStack.peek();
                newJsonLevel = new JsonLevel(mode, new JsonPointer(current.jsonPointer().tokens()));
            } else {
                newJsonLevel = new JsonLevel(mode, new JsonPointer());
            }
        } else if (mode == Mode.JSON_ARRAY) {
            if (levelStack.size() > 0) {
                JsonLevel current = levelStack.peek();
                newJsonLevel = new JsonLevel(mode, new JsonPointer(current.jsonPointer().tokens()));
            } else {
                newJsonLevel = new JsonLevel(mode, new JsonPointer());
            }
            newJsonLevel.isArray(true);
            newJsonLevel.setArrayIndexOnJsonPointer();
        }

        levelStack.push(newJsonLevel);
    }
457262
public void log(LogLevel level, String msg)
	{
		if (level != LogLevel.OFF && level.level <= logLevel.level)
			logger.add(writers, name, level, msg, null);
	}
383913
private function partial($id, $indent, $level)
    {
        if ($indent !== '') {
            $indentParam = sprintf(self::PARTIAL_INDENT, var_export($indent, true));
        } else {
            $indentParam = '';
        }

        return sprintf(
            $this->prepare(self::PARTIAL, $level),
            var_export($id, true),
            $indentParam
        );
    }
1236928
public static void log(final Level level, final String message) {
		System.err.println("LOGGER " + level + ": " + message);
	}
85383
public void log(Level level, String format, Object... args)
    {
        if (isLoggable(level))
        {
            if (format != null)
            {
                logIt(level, String.format(format, args));
            }
            else
            {
                logIt(level, String.format("%s format == null", level));
            }
        }
    }
865136
public void setId(Object id) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  /*if (idFlag == SET) {
		 if (tc.isDebugEnabled()) Tr.debug(tc, "Illegal State: tried to set id to "+id+
											   ", but id was already set to "+this.id  );
		  throw new IllegalStateException("id was already set");
	  } */
	  idFlag = SET;
	  this.id = id;
	  if (tc.isDebugEnabled())
		 Tr.debug(tc, "set id=" + id);
   }
1209620
public static void addDeepLogger(Object object, Level level)
    {
        addDeepLogger(object, m -> logger.log(level, m));
    }
676026
public Integer getAndIncrementIDSeq(final String id) {
        Validate.notNull(id, "ID cannot be null");
        Integer count = this.idCounts.get(id);
        if (count == null) {
            count = Integer.valueOf(1);
        }
        this.idCounts.put(id, Integer.valueOf(count.intValue() + 1));
        return count;
    }
799922
@Override
    public void log(int level, String message) {
        switch (level) {
        case LogChute.WARN_ID:
            log.warn(message);
            break;
        case LogChute.INFO_ID:
            log.info(message);
            break;
        case LogChute.TRACE_ID:
            log.trace(message);
            break;
        case LogChute.ERROR_ID:
            log.error(message);
            break;
        case LogChute.DEBUG_ID:
        default:
            log.debug(message);
            break;
        }
    }
732744
@SuppressWarnings("unchecked")
  public <T extends CMAResource> T setId(String id) {
    getSystem().setId(id);
    return (T) this;
  }
547139
private static void populateLevels() {
        levelList = new LinkedList();

        levelList.add(Level.FATAL.toString());
        levelList.add(Level.ERROR.toString());
        levelList.add(Level.WARN.toString());
        levelList.add(Level.INFO.toString());
        levelList.add(Level.DEBUG.toString());
		Level trace = Level.toLevel(5000, null);
		if (trace != null) {
			levelList.add(trace.toString());
		}

        utilLoggingLevelList = new LinkedList();

        utilLoggingLevelList.add(UtilLoggingLevel.SEVERE.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.WARNING.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.INFO.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.CONFIG.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.FINE.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.FINER.toString());
        utilLoggingLevelList.add(UtilLoggingLevel.FINEST.toString());

    }
1048391
public void log(Level level, Object... elements) {
		if(willWrite.compareTo(level)<=0) {
			StringBuilder sb = buildLine(level, new StringBuilder(),elements);
			if(context==null) {
				System.out.println(sb.toString());
			} else {
				context.log(sb.toString());
			}
		}
	}
166245
private String formatLevel(Event.Level level) {
        if (level == null) {
            return null;
        }

        switch (level) {
            case DEBUG:
                return "debug";
            case FATAL:
                return "fatal";
            case WARNING:
                return "warning";
            case INFO:
                return "info";
            case ERROR:
                return "error";
            default:
                logger.error("The level '{}' isn't supported, this should NEVER happen, contact Sentry developers",
                    level.name());
                return null;
        }
    }
697868
public void addResults(final String id, final ITimeSyncedIterator iterator) {
    if (id == null) {
      throw new IllegalArgumentException("Missing ID");
    }
    if (iterator == null) {
      throw new IllegalArgumentException("Iterator cannot be null");
    }
    results.put(id, iterator);
  }