Giter Site home page Giter Site logo

Comments (3)

consp1racy avatar consp1racy commented on June 4, 2024 2

Oh hey, it's been there for half a year!

https://github.com/JakeWharton/timber/blob/6f7ecafd5f9d410106dcd02b2373b40cfb9e6809/common/src/main/kotlin/timber/log/Timber.kt#L79

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.

ajalt avatar ajalt commented on June 4, 2024 1

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.

klemensz avatar klemensz commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.