Git Product home page Git Product logo

Comments (3)

jdiazcano avatar jdiazcano commented on June 3, 2024

I will for sure add the reloadErrorListener feature (almost for sure today). I actually didn't think about configuration mistakes etc.

This will be the signature of the function inside the ConfigProvider interface.

    /**
     * Adds a reload listener that will be called when there is an exception in the reload process.
     */
    fun addReloadErrorListener(listener: () -> Unit)

For the logging... I might do it but that is not one of my priorities right now. With the experience I have seen that the logging for a (I'd say) relatively small library like this one adds nothing but overhead for the real application log so I decided to go with the listeners approach where each one can react how they want to the different events like reload, error reloading etc.

from cfg4k.

jdiazcano avatar jdiazcano commented on June 3, 2024

So I have added the listener, it is currently in master.

    /**
     * Adds a reload listener that will be called when there is an exception in the reload process.
     */
    fun addReloadErrorListener(listener: (Exception) -> Unit)

This is the final signature and for the logging you can open a new issue to be discussed there, please!

from cfg4k.

rocketraman avatar rocketraman commented on June 3, 2024

This is the final signature and for the logging you can open a new issue to be discussed there, please!

No need I think... I agree with your idea that logging is unnecessary and listeners are the way to go. Thanks!

from cfg4k.

Related Issues (20)

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.