-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
djkim
committed
Jul 31, 2019
1 parent
eff62eb
commit b453224
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'package:fimber/fimber.dart'; | ||
import 'package:flutter/foundation.dart'; | ||
|
||
class Log { | ||
static initialize() { | ||
if (!kReleaseMode) { | ||
Fimber.plantTree(DebugTree()); | ||
} | ||
} | ||
|
||
static d(String tag, String message, {dynamic ex}) { | ||
if (!kReleaseMode) { | ||
Fimber.log("D", message, tag: tag, ex: ex); | ||
} | ||
} | ||
|
||
static w(String tag, String message, {dynamic ex}) { | ||
if (!kReleaseMode) { | ||
Fimber.log("W", message, tag: tag, ex: ex); | ||
} | ||
} | ||
|
||
static e(String tag, String message, {dynamic ex}) { | ||
if (!kReleaseMode) { | ||
Fimber.log("E", message, tag: tag, ex: ex); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,9 @@ dependencies: | |
path: | ||
synchronized: | ||
|
||
# logging | ||
fimber: | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
|