warn method

void warn(
  1. String message, {
  2. Object? error,
  3. StackTrace? stacktrace,
})

Logs a message at the WARN level.

Typically used to indicate a potential problem that is non-fatal.

Example:

log.warn('Disk space is running low.');

Implementation

void warn(String message, {Object? error, StackTrace? stacktrace}) {
  add(LogLevel.WARN, message, error: error, stacktrace: stacktrace);
}