Questions tagged [slf4j]

Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction layer for various logging frameworks. Please also include a tag for the actual logging framework you're using if you are attempting to configure logging for your application.

The Simple Logging Facade for Java (commonly known as "SLF4J") serves as a simple facade or abstraction layer for various logging frameworks, e.g. java.util.logging, log4j and logback.

One can unify all logging across an application and the libraries it uses via this abstraction layer. Code familiar with SLF4J uses the SLF4J API directly for logging. Any existing code or libraries that use some other logging framework can be bridged to get their logging redirected to SLF4J instead. The end application at deployment time includes a binding to the actual logging framework that they are using, and can configure that logging framework as desired for all logging throughout the application.

References:

3285 questions
1
vote
2 answers

JUL to SLF4j with oracle jdbc driver

I am trying to redirect java.util.logging messages logged by the oracle jdbc driver and the oracle ucp (universal connection pool) library, but not able to do so. The messages logged by my application using JUL get logged but the ones logged by the…
Andy Dufresne
  • 6,022
  • 7
  • 63
  • 113
1
vote
1 answer

How do I add a request identifier to a Quartz Job instance's log messages?

We use MDC to add a request id to HTTP requests in our Spring Boot application using SLF4J. We do this by adding a GenericFilterBean that intercepts the request, converts to HTTTP, and writes the desired information to MDC.put(...); What is the…
IcedDante
  • 6,145
  • 12
  • 57
  • 100
1
vote
1 answer

hibernate logging

I have an interface that I want Hibernate to log everything to. My curernt configuration is done programmatically, so I don't have any hibernate.properties or hibernate.cfg.xml file. configuration = new Configuration() .setProperty(…
iliaden
  • 3,791
  • 8
  • 38
  • 50
1
vote
0 answers

Getting this error "class org.slf4j.MDC tried to access private field org.slf4j.impl.StaticMDCBinder.SINGLETON"

I am starting a spring boot application which listens to kafka topic and processes them with Apache flink. Basically, i am migrating the existing application from Java 8 to 11. I made the required changes and getting this error while starting the…
1
vote
2 answers

External Log4J2 configuration in Java EE application

I'm working on a Java EE project which had configuration files in resources folder. The web project is assembled into a war file using Maven and deployed to Tomcat. Then I started doing some maintainance and tried to externalize the configurations…
ardatosun
  • 457
  • 4
  • 22
1
vote
2 answers

migrate from slf4j+logback to slf4j+log4j

I was using slf4j+logback in my plugin for third-party application. New version of main application was switched from log4j to slf4j+log4j+custom appenders.... It look like that i need to change my code, so logging start working again. Basically to…
1
vote
1 answer
1
vote
1 answer

How Can I Add Console Appender In Logger Object Using log4j-over-slf4j Dependency?

I can't be able to add console appender using logger.addAppender method with log4j-over-slf4j 1.7.x dependency. Moreover, I am unable to set target of that particular Console Appender(i.e., SYSTEM_OUT/SYSTEM_ERR). I have initialized a console…
Ritesh_RM
  • 13
  • 6
1
vote
1 answer

Duplicately formatted logger output insid JBoss/ Wildfly AS

It seems, that I cannot exclude the JBoss/ Wildfly Logging Subsystem. I have an Java EE ear and would like to use slf4j API together with log4J2 Implementation. My intention was to disable JBoss logging subsystem to let my slf4j log4j2…
kerner1000
  • 3,382
  • 1
  • 37
  • 57
1
vote
1 answer

log4j2.xml lookup system properties set by Spring

I'm migrating from log4j 1.x to 2.x and we have a properties file "foo.properties" which we read in spring's applicationContext.xml and turn into system properties:
krsong
  • 13
  • 3
1
vote
3 answers

Selenium program doesn't stop running

I am developing in VSCode with the Java Extension Pack (which includes Maven). For some reason, my program (below) does not terminate after running. import java.util.Scanner; import org.openqa.selenium.WebDriver; import…
manissss
  • 101
  • 1
  • 12
1
vote
1 answer

How to add a rolling file logger to SpringBoot?

I am learning SpringBoot using this very good example here. But one thing I wanted to learn how to add into this project is RollingFileAppender. In my previous projects I always did the following: 1) Added these dependencies
PedroD
  • 5,670
  • 12
  • 46
  • 84
1
vote
2 answers

Why is my Log4j logging not displaying to the console?

I have a web app built in Eclipse/STS with Spring MVC and Maven. I want to add logging, so I added SLF4 and Log4J to the pom.xml like this ..
1
vote
1 answer

Get log object in memory - Logback

I'm using logback in spring-boot 2.2.5.RELEASE, I need to get the log object in memory so I can manipulate the info and proccess it. What I would expect is something like this. import org.slf4j.Logger; import…
Kevin Valdez
  • 359
  • 4
  • 17
1
vote
2 answers

Log4j2 Slf4j Issue - logger files not getting created on server startup

ERROR StatusLogger Reconfiguration failed: No configuration found for '75b84c92' at 'null' in 'null' The above is the error I am getting on server startup(netty). The dependencies I am using are log4j-core-2.13.1, log4j-api-2.13.1,…
Manyu
  • 41
  • 2
  • 6
1 2 3
99
100