Skip to content

Commit

Permalink
fix(engine): fixed logger definitions is empty throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
Seven Du committed Mar 6, 2023
1 parent 72822e6 commit 4dc62f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/binary_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ class BinaryEngine extends UniversalEngine implements Engine {

/// Resolve rust log level.
String get _rustLogLevel {
if (logger.definitions.isEmpty) return Event.info.name;

return logger.definitions.map((e) => e.event).reduce((value, element) {
if (element == Event.query) return element;
if (element == Event.info || value == Event.info) return Event.info;
Expand Down

0 comments on commit 4dc62f1

Please sign in to comment.