logMessage method

T logMessage(
  1. String level,
  2. Object? message, {
  3. Object? prefix,
})

Implementation

T logMessage(String level, Object? message, {Object? prefix}) {
  level = level.trim().toUpperCase();
  message = _normalizeElement(message);

  if (prefix != null) {
    print('[$level] $prefix $message');
  } else {
    print('[$level] $message');
  }

  return this as T;
}