Comments (5)
Actually I don't know why this doesn't trigger. It runs first...
from timber.
Currently, both TimberArgCount and ThrowableNotAtBeginning are thrown for this example.
Do we still want to remove TimberArgCount here and behave like String.format(...) (which ignores extra arguments)?
from timber.
I still want to fail on extra arguments. Maybe ignore a single extra argument if its type is a subclass of Throwable and it's last?
I'm fine with both being triggered, but I'd prefer not to send mixed messages.
from timber.
Maybe ignore a single extra argument if its type is a subclass of Throwable and it's last?
Here's how that would look:
Timber.d("Failed", e); // fail: ThrowableNotAtBeginning
Timber.d("Failed %s", "s", e); // fail: ThrowableNotAtBeginning
Timber.d("Failed %s", e, "s"); // fail: ThrowableNotAtBeginning AND TimberArgCount
Timber.d("Failed %s %s", e, "s1", "s2"); // fail: ThrowableNotAtBeginning AND TimberArgCount
Timber.d("Failed %s %s", "s1", e, "s2"); // fail: ThrowableNotAtBeginning AND TimberArgCount
Timber.d("Failed %s %s", "s1", "s2", e); // fail: ThrowableNotAtBeginning
Adding the last argument constraint might be confusing. WDYT?
from timber.
The reasons the check exists is because Android's Log
accepts the throwable at the end instead of the start. In your examples I would think that only TimberArgCount would run for the three examples where both are currently running.
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.