-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete the static logger #646
Conversation
@@ -139,23 +136,4 @@ internal class PublicApiTest { | |||
} | |||
} | |||
} | |||
|
|||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortest test life time ever lol
@@ -86,26 +84,6 @@ internal class ModuleInitBootstrapperTest { | |||
) | |||
} | |||
|
|||
@Test | |||
fun `internal error service hooked up to both static and non-static SDK instance`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So long, farewell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
|
||
private static void logError(@NonNull String message, @Nullable Exception e) { | ||
Embrace.getInstance().getInternalInterface().logError(message, null, null, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extract getInternalInterface
to variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave this as is for now. I like idea of making internal error recording more explicit and I'll do this as part of that refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
a568b3c
to
d25f1e0
Compare
bbccb3e
to
67efcdb
Compare
Goal
Burn this sucker down with gasoline. We have internal APIs that we expose so hosted SDKs can log stuff like internal errors - just the same APIs in various places so the static logger won't have to be used.
For now, we add helpers in each class so we don't have to make the same internal API calls with default parameters that aren't used. But we should really revisiting our logging strategy, not only in these classes, but elsewhere too.
There doesn't seem to be a rhyme or reason why we log debug/info/error and when we include an exception. Only the ones with exceptions will make it back to the server - the rest, we are just outputting to the logger which likely won't be looked at by anyone. So why even bother? In the off chance we need to see a client logging put to debug a problem? That's a lot of overhead for a very limited use case.
BTW, I touched some Swazzled code, so I'm including @cesarmax22 to make sure this is fine. It should be?
Testing
Modified existing tests to work. CodeConv is yelling again because of some of the exception case logging not being tested. Boo effing hoo.