Code Monkey home page Code Monkey logo

Comments (5)

oshai avatar oshai commented on May 19, 2024

Regarding the first issue see the discussion here: #22

Regarding the second issue, a pull request is welcome!

from kotlin-logging.

darioseidl avatar darioseidl commented on May 19, 2024

Thanks for the response! I understand this is a question of preference (or context), some people prefer to be fail-safe, while I'd rather fail-fast. The behavior is also different from Slf4j, compare:

log.underlyingLogger.info("Test: {}", "x".toInt())

with

log.info{"Test ${"x".toInt()}"}

The former throws the exception, the latter doesn't. So I think this should at least be mentioned somewhere in the readme or documentation, otherwise it could lead to some real head scratchers.

I created a pull request for the nullable throwables.

from kotlin-logging.

oshai avatar oshai commented on May 19, 2024

usually, I also prefer fail-fast than fail-safe. However, I think in this case it is better to be consistent with other logging frameworks. the exception you described above in "x".toInt() is not part of the framework but happened before the framework is called.

from kotlin-logging.

oshai avatar oshai commented on May 19, 2024

version 1.5.4 was released with nullable throwables (#39)

from kotlin-logging.

darioseidl avatar darioseidl commented on May 19, 2024

Ah, yes, you're right, the logging framework doesn't even even see the exception in the first example.

Thank you for the quick release!

from kotlin-logging.

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.