zap method

void zap(
  1. Object? message, {
  2. String? tag,
  3. Level level = Level.INFO,
})

Zap a log message with optional tag and level.

For example to zap a message:

BoltLogger.zap('Electricity is in the air!');

The message can also be an Exception/Error, StackTrace or a List to zap all 3 types (Object?, Exception/Error, StackTrace). These will be passed to the logger.

BoltLogger.zap(['Electricity is in the air!', myException, stackTrace]);

Implementation

void zap(Object? message, {String? tag, Level level = Level.INFO}) {
  // We actually want to know to runtimeType of the object
  // ignore: no_runtimeType_toString
  BoltLogger.zap(message, tag: tag ?? runtimeType.toString(), level: level);
}