Skip to content

Enhancement: Replace print() with log() - #453

Merged
ueman merged 7 commits into
mainfrom
fix/do-not-record-sdk-logs
May 7, 2021
Merged

Enhancement: Replace print() with log()#453
ueman merged 7 commits into
mainfrom
fix/do-not-record-sdk-logs

Conversation

@ueman

@ueman ueman commented May 4, 2021

Copy link
Copy Markdown
Collaborator

📜 Description

💡 Motivation and Context

Fixes #451

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

@@ -254,5 +255,10 @@ void noOpLogger(SentryLevel level, String message) {}

/// A Logger that prints out the level and message
void dartLogger(SentryLevel level, String message) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For v6 I'd like to add an error and stacktrace parameter to our loggers.

They can be passed to https://api.flutter.dev/flutter/dart-developer/log.html and look hopefully better

@codecov-commenter

codecov-commenter commented May 4, 2021

Copy link
Copy Markdown

Codecov Report

Merging #453 (fb88b55) into main (5039731) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
+ Coverage   89.98%   90.04%   +0.05%     
==========================================
  Files          54       54              
  Lines        1698     1707       +9     
==========================================
+ Hits         1528     1537       +9     
  Misses        170      170              
Impacted Files Coverage Δ
dart/lib/src/protocol/sentry_level.dart 100.00% <100.00%> (ø)
dart/lib/src/sentry_options.dart 91.30% <100.00%> (+0.60%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5039731...fb88b55. Read the comment docs.

Comment thread dart/lib/src/sentry_options.dart Outdated
@ueman

ueman commented May 4, 2021

Copy link
Copy Markdown
Collaborator Author

Logs look like this now
screenshot

Well without the double brackets around sentry

@ueman
ueman marked this pull request as ready for review May 4, 2021 10:54
Comment thread CHANGELOG.md Outdated
Comment thread dart/lib/src/protocol/sentry_level.dart Outdated
Comment thread dart/lib/src/protocol/sentry_level.dart Outdated
/// function.
/// These levels are inspired by
/// https://pub.dev/documentation/logging/latest/logging/Level-class.html
int toLogLevel() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we call toDartLogLevel instead?

Comment thread dart/lib/src/protocol/sentry_level.dart Outdated

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ueman
ueman merged commit 7fc44a1 into main May 7, 2021
@ueman
ueman deleted the fix/do-not-record-sdk-logs branch May 7, 2021 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter out SDK logs from Breadcrumbs

3 participants