void updateLogLevel(String name)

Updates the log level to the level specified name.

Source

void updateLogLevel(String name) {
  name = name.trim().toUpperCase();

  if (name == "DEBUG") {
    name = "ALL";
  }

  Map<String, Level> levels = {};
  for (var l in Level.LEVELS) {
    levels[l.name] = l;
  }

  var l = levels[name];

  if (l != null) {
    logger.level = l;
  }
}