Comments (3)
Oh hey, it's been there for half a year!
If this works, with static imports the new multiplatform Timber renders TimberKt obsolete. Well, mostly (w
vs. warn
). Or import aliasing. This is interesting.
from timberkt.
I agree that more lazyness would be great.
Timberkt actually used to do something like your solution 1, but I changed it in version 1.2.0. The reason why is that the noinline
wrapper cause a new class to be created for each log call, which adds a lot of methods.
I also thought about your second solution, but then this library wouldn't be compatible with existing code bases that use regular timber, so I don't want to do that either.
Maybe the right solution would be to make a PR to upstream timber to allow this sort of lazyness with inline methods.
from timberkt.
I've been using this library for many years now thinking that messages are being evaluated lazily ... just to read now that it's not the case 😆
from timberkt.
Related Issues (9)
- [Question] Why are the extension methods on Timber's Tree object? HOT 2
- Timber object should also support string arguments HOT 8
- Make the throwable in error nullable
- Mocking framework
- Provide a proxy to timber.log.Timber.DebugTree HOT 1
- Timber tree subclass
- Update Timber to fix Lint Error
- Add @JvmOverloads to support optional arguments in Java 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 timberkt.