popLogLevel static method

int? popLogLevel()

Restores the logLevel to the value it had before the last call to pushLogLevel. If pushLogLevel was never called, this method has no effect and return null. Otherwise, it returns the value of logLevel after it has been restored.

Implementation

static int? popLogLevel() {
  final sq = _getOrInitialize();
  if (sq._logLevels.isNotEmpty) {
    Squadron.logLevel = sq._logLevels.removeLast();
  }
  return Squadron.logLevel;
}