Comments (13)
I was under the impression that wtf log level was a joke.
from timber.
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.
from timber.
It crashes your app.
from timber.
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
from timber.
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?
from timber.
Yes.
Why do you explicitly choose to use it?
from timber.
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.
from timber.
@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 -
- If message is less than MAX_LOG_LENGTH
- If over MAX_LOG_LENGTH (within while loop)
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?
from timber.
See the code above for what I'm talking about. Looking forward to feedback.
from timber.
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).
from timber.
Do we want to merge this in for a new release? Yes/No?
from timber.
Merged to master. Need the weekend to bake the release to see if anything else needs to be included.
from timber.
from timber.
Related Issues (20)
- Lint does not warn if format specifier missing
- š Iād like to add this to the ReadMe Documentation.
- Is it possible to make isLoggable() function public?
- Escape percent symbol? HOT 2
- Is there an MDC like logback? HOT 1
- Getting a parse error when using file logging
- Timber logs not showing in Android Studio Dolphin 2021.3.1 HOT 3
- Want to bypass Lint warning BinaryOperationInTimber HOT 2
- Could not load custom lint check jar
- Make Tree:tag protected instead of internal HOT 4
- Where are the priority codes? HOT 3
- Activo
- Still `new Timber.DebugTree()` cannot be coded in Java HOT 10
- Distribution as a jar artifact HOT 2
- Gftrlgxsi
- Timber.d with %chinese throw UnknownFormatConversionException HOT 1
- https://jakewharton.github.io/timber/docs/5.x/#-1457074065%2FPackages%2F1218876905
- Anyway to add a ignore Class for tag? HOT 1
- Several lint checks not working in Kotlin files, but working ok in Java files
- Timber is triggered more than once even though it's in LaunchEffect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timber.