Skip to content

RUMM-2754: Create implementation of InternalLogger#1155

Merged
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2754/create-implementation-of-internal-logger
Nov 24, 2022
Merged

RUMM-2754: Create implementation of InternalLogger#1155
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2754/create-implementation-of-internal-logger

Conversation

@0xnm

@0xnm 0xnm commented Nov 23, 2022

Copy link
Copy Markdown
Member

What does this PR do?

Simple implementation of InternalLogger interface which forwards logs according to the target specified.

Task RUMM-2764 created to start using it in the codebase, not a part of SDK v2 goals.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested a review from a team as a code owner November 23, 2022 16:37
@xgouchet xgouchet added the size-medium This PR is medium sized label Nov 23, 2022
@0xnm
0xnm force-pushed the nogorodnikov/rumm-2754/create-implementation-of-internal-logger branch from 737fb93 to cf0fddb Compare November 23, 2022 17:55
@codecov-commenter

codecov-commenter commented Nov 23, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.31%. Comparing base (d451d7e) to head (cf0fddb).

Files with missing lines Patch % Lines
...n/com/datadog/android/v2/core/SdkInternalLogger.kt 92.31% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           feature/sdkv2    #1155      +/-   ##
=================================================
+ Coverage          82.28%   82.31%   +0.03%     
=================================================
  Files                353      354       +1     
  Lines              11796    11822      +26     
  Branches            2007     2012       +5     
=================================================
+ Hits                9706     9731      +25     
- Misses              1465     1468       +3     
+ Partials             625      623       -2     
Files with missing lines Coverage Δ
...in/com/datadog/android/core/internal/SdkFeature.kt 89.09% <100.00%> (ø)
...otlin/com/datadog/android/v2/api/InternalLogger.kt 100.00% <ø> (ø)
...n/com/datadog/android/v2/core/SdkInternalLogger.kt 92.31% <92.31%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

attributes: Map<String, Any?>
) {
when (target) {
// TODO RUMM-2764 we should remove sdkLogger, devLogger and telemetry

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good point

error: Throwable?,
attributes: Map<String, Any?>
) {
devLogger.log(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you don't want to pass sdkLogger, devLogger and telemetry as dependencies or the problem is that they cannot be yet initialized ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, don't want to reference them in the constructor. Anyway it has no real benefit (other than mocking).

@mariusc83 mariusc83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work

@xgouchet xgouchet 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.

Nice work !

@0xnm
0xnm merged commit 76058cd into feature/sdkv2 Nov 24, 2022
@0xnm
0xnm deleted the nogorodnikov/rumm-2754/create-implementation-of-internal-logger branch November 24, 2022 13:11
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-medium This PR is medium sized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants