hasErrors static method
Checks if a tag has any error entries (WARNING/ERROR/CRITICAL).
Returns false in release builds.
Example:
if (Log.hasErrors('auth')) {
Log.export('auth');
notifyAdmin();
}
Implementation
static bool hasErrors(String name) {
var result = false;
assert(() {
final entries = _tags[name];
if (entries != null) {
result = entries.any((e) => e.isError);
}
return true;
}());
return result;
}