Skip to content

fix(kotlin): log to Logcat instead of stderr - #2820

Open
aleksandar-apostolov wants to merge 1 commit into
mainfrom
fix/kotlin-logcat
Open

aleksandar-apostolov wants to merge 1 commit into
mainfrom
fix/kotlin-logcat

Conversation

@aleksandar-apostolov

Copy link
Copy Markdown
Contributor

Why

Refs AND-2082

Five failures the SDK carries on past were printed to System.err, with no tag, level or stack trace.

Changes

  • One internal warn(message, cause) logs Log.w("StreamAgents", message, cause), so Logcat shows the stack trace. The five call sites keep their wording.
  • The KDocs of on, close and goodbye say logcat instead of standard error.
  • unitTests.isReturnDefaultValues is on, since android.util.Log throws in JVM tests otherwise.

Validation

:core:testDebugUnitTest :core:lintDebug: 339 tests pass (10 skipped), no lint errors. Juno compiles. The two StreamClientsTest cases that captured stderr keep their behaviour checks; Logcat output is not asserted in JVM tests.

@getstream-metis

Copy link
Copy Markdown

👋 Hi Aleksandar, want a second pair of eyes on this?

I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.

  • Review this PR

Or comment /jeffery review. I'll stay quiet unless you ask.

This branch has not been deployed

No deployments
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.

1 participant