GithubHelp home page GithubHelp logo

Comments (6)

sdeleuze avatar sdeleuze commented on June 14, 2024 2

@tgirard12 Thanks for the latest improvements.

What do you think about providing a shortcut for LoggerFactory.getLogger(Foo::class.java) to have a more idiomatic syntax. We should not abuse of top level function but this one is going to be used widely. Maybe logger<Foo>() ?

from spring-fu.

sdeleuze avatar sdeleuze commented on June 14, 2024 2

Ok to integrate logging to the core, but I would let logback support as an optional module and maybe use slf4j + slf4j-simple binding which would be sufficient for basic needs and consistent with Spring Fu goal to provide a minimal core. Also an optional log4j2 module would make sense.

from spring-fu.

tgirard12 avatar tgirard12 commented on June 14, 2024 1

Thanks for the proposal @liqweed, it seems to be a good idea, I will investigate on this too.

from spring-fu.

tgirard12 avatar tgirard12 commented on June 14, 2024

Also, I think we should integrate logging module into the core and provide by default a logback console appender with Info level.
It will provide a better first launch without all the Debug messages.

from spring-fu.

liqweed avatar liqweed commented on June 14, 2024

About the logger<Foo>() syntax proposal - have you considered integrating with https://github.com/MicroUtils/kotlin-logging ?

It allows to define a logger (using examples from their README):
private val logger = KotlinLogging.logger {}

and call the logger (slf4j under the hood) using lambdas:
logger.debug { "Some $expensive message!" }

from spring-fu.

sdeleuze avatar sdeleuze commented on June 14, 2024

@tgirard12 I don't think LogLevel in the logging module should import logback stuff, it should not require Logback JAR to work (it brokes the CI, see https://ci.spring.io/teams/spring-fu/pipelines/spring-fu).

from spring-fu.

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.