Enable avoid_print lint. (#91332)

This commit is contained in:
Ian Hickson
2021-10-07 09:53:03 -07:00
committed by GitHub
parent 3c6c2aa50a
commit cb378edc9e
85 changed files with 359 additions and 246 deletions

View File

@@ -51,6 +51,7 @@ typedef LoggingFunction = void Function(LogMessage log);
///
/// Exits with status code 1 if the `log` is [LoggingLevel.severe].
void defaultLoggingFunction(LogMessage log) {
// ignore: avoid_print
print('[${log.levelName}]::${log.tag}--${log.time}: ${log.message}');
if (log.level == LoggingLevel.severe) {
exit(1);