Skip to content
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

CrashlyticsLogWriter is ignoring minSeverity #431

Open
Nek-12 opened this issue Jan 18, 2025 · 5 comments
Open

CrashlyticsLogWriter is ignoring minSeverity #431

Nek-12 opened this issue Jan 18, 2025 · 5 comments
Assignees

Comments

@Nek-12
Copy link

Nek-12 commented Jan 18, 2025

The image pretty much sums it up. Our crashlytics logs are polluted by verbose-level garbage and leak sensitive data.

Image

@KevinSchildhorn
Copy link
Contributor

Hi Nikita, Are you opening the project from the root directory?

Image

isLoggable is used in the BaseLogger which is in the kermit-core module, so if you don't open it from the root then it won't see that module.

I'm not sure why you're seeing verbose messages, can you confirm your minSeverity passed into your CrashlyticsLogWriter and your minSeverity passed into your Logger?

I made a quick branch that runs some tests on CrashlyticsLogWriter that seem to work fine. If you're still running into issues let me know.

@KevinSchildhorn KevinSchildhorn self-assigned this Jan 21, 2025
@Nek-12
Copy link
Author

Nek-12 commented Jan 21, 2025

Yes, I'm sorry for the confusion. isLoggable is used indeed, however I can confirm that we are seeing Verbose-level logs in our crashlytics console. Small example (to not leak too much data)

Image

Yes I passed minSeverity = Info and minCrashSeverity = Error.

I'm only setting the Severity and loggers once per app lifecycle. What else could be the case of that behavior?

I'm not overriding Logger though. I'm only calling Logger.setLogWriters to set the root log writers. Isn't that enough?

@KevinSchildhorn
Copy link
Contributor

KevinSchildhorn commented Jan 22, 2025

That should be enough yes. I'm not sure why this isn't working as expected for you, I'm trying to test it on my side and it seems correct. Can you share the code of how you're setting up and logging to the Logger? Can you also try just creating a custom logger in your project as a test and seeing if the issue still occurs? Something like:

val logger = Logger(
    config = loggerConfigInit(CrashlyticsLogWriter()),
    tag = "MyAppTag"
)
logger.v { "Hello World" }

Also make sure you're using the latest version of kermit (2.0.5).

If that still doesn't work then maybe you can create a local copy of CrashlyticsLogWriter so that you can breakpoint and test there, since LogWriter is open.

Let me know if that helps and if you're still seeing the issues there.

@samhill303
Copy link
Collaborator

Sounds like this is resolved. Closing

@Nek-12
Copy link
Author

Nek-12 commented Feb 3, 2025

This isn't resolved. We just haven’t yet had a public release that would let us test if the logging spam is reduced. I’ll get back in touch in a week or so

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

No branches or pull requests

3 participants