Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vjrj
ginkgo
Commits
4597c672
Commit
4597c672
authored
4 months ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Add Logger instance and enhance loggerDev function
parent
f43f416b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/ui/logger.dart
+9
-2
9 additions, 2 deletions
lib/ui/logger.dart
pubspec.lock
+8
-0
8 additions, 0 deletions
pubspec.lock
pubspec.yaml
+2
-1
2 additions, 1 deletion
pubspec.yaml
with
19 additions
and
3 deletions
lib/ui/logger.dart
+
9
−
2
View file @
4597c672
// logs
import
'package:easy_logger/easy_logger.dart'
;
import
'package:logger/logger.dart'
;
import
'ui_helpers.dart'
;
final
Logger
log
=
Logger
();
final
EasyLogger
logger
=
EasyLogger
(
name:
'ginkgo'
,
defaultLevel:
LevelMessages
.
debug
,
...
...
@@ -19,8 +22,12 @@ final EasyLogger logger = EasyLogger(
],
);
void
loggerDev
(
Object
?
message
)
{
void
loggerDev
(
Object
?
message
,
{
Object
?
error
,
StackTrace
?
stackTrace
}
)
{
if
(
inDevelopment
&&
message
!=
null
)
{
logger
(
message
);
if
(
error
!=
null
||
stackTrace
!=
null
)
{
log
.
e
(
message
,
error:
error
,
stackTrace:
stackTrace
);
}
else
{
logger
(
message
);
}
}
}
This diff is collapsed.
Click to expand it.
pubspec.lock
+
8
−
0
View file @
4597c672
...
...
@@ -1335,6 +1335,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.0"
logger:
dependency: "direct main"
description:
name: logger
sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1
url: "https://pub.dev"
source: hosted
version: "2.5.0"
logging:
dependency: transitive
description:
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
2
−
1
View file @
4597c672
...
...
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version
:
1.3.1
version
:
1.3.1
-1
environment
:
sdk
:
^3.5.2
...
...
@@ -138,6 +138,7 @@ dependencies:
flutter_zxing
:
^1.7.0
screenshot
:
^3.0.0
blockchain_utils
:
^3.4.0
logger
:
^2.5.0
dev_dependencies
:
flutter_test
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment