Coder Social home page Coder Social logo

Use SLF4J instead of Log4j about wiremock HOT 12 CLOSED

wiremock avatar wiremock commented on May 23, 2024
Use SLF4J instead of Log4j

from wiremock.

Comments (12)

tomakehurst avatar tomakehurst commented on May 23, 2024

True, and it's on the list.

You can however write your own Notifier impl for the same effect.

from wiremock.

williamvoor avatar williamvoor commented on May 23, 2024

Somehow related to this issue. I tried to decrease log levels of wiremock to ERROR only, and it appears loggers are created with under multiple names, not following a package hierarchy. To achieve the ERROR level I had to include 4 logger names in my log4j.xml (com.github.tomakehurst.wiremock, /__admin, /, org.mortbay.log). Is this an intended behaviour?

from wiremock.

tomakehurst avatar tomakehurst commented on May 23, 2024

Sort of. I originally set the loggers up with only the standalone use case in mind. This wasn't a great decision, and it's one I intend to revisit at some point.

from wiremock.

o-nix avatar o-nix commented on May 23, 2024

Vote for such refactoring. Otherwise I'm forced to add log4.properties.

from wiremock.

yogurtearl avatar yogurtearl commented on May 23, 2024

+1 for this. I think it would help with running WireMock on Android.

from wiremock.

tomakehurst avatar tomakehurst commented on May 23, 2024

One caveat with this - there has to be a logging impl in the standalone JAR (and I'm minded to keep log4j for that), so it'll only be possible to switch logging implementations when using the non-standalone JAR.

Does this still solve everyone's issues?

Can anyone think of a better way?

from wiremock.

williamvoor avatar williamvoor commented on May 23, 2024

Sounds good. I believe people using standalone would not care what logger is being used.

from wiremock.

xunnanxu avatar xunnanxu commented on May 23, 2024

You could include slf4j, log4j, and the binding in the dependency. So if a project needs to use something else, we can just exclude log4j and its binding.

from wiremock.

tomakehurst avatar tomakehurst commented on May 23, 2024

Please see/comment on:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/wiremock-user/a6Reo7QAMYo/rzY5v8Apgv8J

from wiremock.

tomakehurst avatar tomakehurst commented on May 23, 2024

This is done on master now. Release shortly.

from wiremock.

xunnanxu avatar xunnanxu commented on May 23, 2024

kudos for the banner but wonder how many people would like that

from wiremock.

tomakehurst avatar tomakehurst commented on May 23, 2024

You think some people might object to it? Any particular reason?

from wiremock.

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.