Skip to content

Commit

Permalink
#1 fix: main demo
Browse files Browse the repository at this point in the history
  • Loading branch information
susatthi committed May 1, 2022
1 parent 41fdb0f commit 6966607
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ linter:
avoid_classes_with_only_static_members: false
constant_identifier_names: true
prefer_relative_imports: true
cascade_invocations: false
20 changes: 15 additions & 5 deletions example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@ final logger = Roggle(
);

void main() {
// ignore: avoid_print
print(
'Run with either `dart example/main.dart` or `dart --enable-asserts example/main.dart`.');
'Run with either `dart example/main.dart` or `dart --enable-asserts example/main.dart`.',
);
demo();
}

void demo() {
logger.d('Log message with 2 methods');
logger.v('Hello roggle!');
logger.d(1000);
logger.i(true);
logger.w([1, 2, 3]);
logger.e({'key': 'key', 'value': 'value'});
logger.wtf(Exception('some exception'));
logger.i(() => 'function message');

logger.e('Error! Something bad happened', 'Test Error');

logger.i('Log message');
try {
throw Exception('some exception');
} on Exception catch (e, s) {
logger.w('with Exception', e, s);
}
}
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: roggle
description: Simple, colorful and easy to expand logger for dart.
version: 0.1.0
homepage: https://github.com/keyber-inc/roggle
homepage: https://github.com/susatthi/roggle

environment:
sdk: ">=2.16.2 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
logger: ^1.1.0
Expand Down

0 comments on commit 6966607

Please sign in to comment.