-
Notifications
You must be signed in to change notification settings - Fork 958
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
Support Log.wtf #32
Comments
Does anyone use this log level? The documentation says that your process could outright be killed if you do. I don't think there's a lot of utility in exposing it inside Timber. |
I was under the impression that wtf log level was a joke. |
Updated link as above link is dead: https://github.com/android/platform_frameworks_base/blob/master/services/core/java/com/android/server/am/ActivityManagerService.java#L11853 |
I need WTF for our project. We forked android so we control the system global setting, WTF_IS_FATAL, and we've set it to false. If I implement WTF will you accept it as a PR? |
Yes. Why do you explicitly choose to use it? |
Personally I have never used it but was convinced for this special use case that we're in with our device. We hook into the system and grab the WTF's and send them up to our servers where we actively monitor them and react to them internally. We only log extreme, definite "this should never happen" type of scenarios so we know if they actually do happen in prod. One such example would be - A new device being ships and it is not configured as we expect from the factory/etc. |
@JakeWharton Would like to see what you think about this ... WTF has an interesting implementation as it depends on this non-public method: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/util/Log.java#L289 All other log levels (v/d/i/w/e) log to println_native where wtf calls this the method linked above. In the Timber#logMessage call I can implement a couple of ifs so that it calls the actual WTF methods if the priority is ASSERT so the underlying wtf implementation is called. This would take two if statements -
My gut says this feels a bit hacky because we're assuming that all ASSERT's are wtf's, but I'm not sure what might be best in this scenario. Whats your opinion on it? Thoughts? |
See the code above for what I'm talking about. Looking forward to feedback. |
I think what you said is fine. It is only slightly hacky, but I'm pretty comfortable with it since the levels are fixed (knock on wood) and unlikely to ever change or be expanded further (and thus necessitate more hacks). |
Do we want to merge this in for a new release? Yes/No? |
Merged to master. Need the weekend to bake the release to see if anything else needs to be included. |
Awesome. Thanks!
|
What About Supporting .wtf (Documentation: http://developer.android.com/reference/android/util/Log.html#wtf(java.lang.String, java.lang.Throwable) ) Log Levels.
The text was updated successfully, but these errors were encountered: