Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
32 views

How to propagate and clear thread context across JVMs for dynamic debug logging

I am trying to implement dynamic debug logging by populating a ThreadContext with specific attributes and filtering logs based on those attributes. Here’s what I have achieved so far: Within the same ...
Rahul verma's user avatar
0 votes
0 answers
16 views

Facing issue - java.lang.ClassCastException: class org.slf4j.helpers.NOPLoggerFactory cannot be cast to class ch.qos.logback.classic.LoggerContext

I am trying upgrade eclipse 4.23 to eclipse 4.31. while doing this I am facing this issue. I am using slf4j and logback version, ch.qos.logback.classic_1.2.13.jar ch.qos.logback.core_1.2.13.jar slf4j....
Birudeo Garande's user avatar
0 votes
0 answers
11 views

RequestLogs aren't getting recorded with siftingappender

This is a workaround for my previous question. How to configure RequestLog for multiple webappcontext in jetty12 In jetty12, Since the RequestLog only exists on the Server level we can't seperate them ...
Hemanth Karniyana's user avatar
1 vote
1 answer
55 views

SLF4J doesn't find provider from logback-classic on vertx

I'm trying to add Logback on a Vertx project, but it seems SLF4J can't see logback even if itself come from a logback dependency. I used maven dependency logback-classic, which transitively imports ...
Mickael Alvarez's user avatar
0 votes
0 answers
36 views

java.lang.LinkageError: loader constraint violation in interface itable initialization for class org.slf4j.helpers.BasicMarkerFactory

I am getting this error while deploying a spring application xapp WAR in JBOSS EAP 8 server. after migrating application from jboss eap7 to jboss eap 8, jdk 11 to 17 and spring 5 to spring 6. I am ...
abhishek's user avatar
0 votes
1 answer
32 views

Setting logback filter generates exception

I've been trying to set an logback filter in my Eclipse Equinox RT application as follows: <?xml version="1.0" encoding="utf-8" standalone="no"?> <configuration ...
skrenato's user avatar
0 votes
0 answers
25 views

How to generate unique log files with Slf4j and logback?

I have a spring boot application that uses Slf4j and logback. This application contains the following class: @Component public class CustomFileLogger { private FileAppender<ILoggingEvent> ...
Noah's user avatar
  • 81
0 votes
0 answers
9 views

Asyncronous Lazy Logging for Maven Project

Short Question: How to achieve lazy logging where Suppliers<> are executed inside the AsyncAppender thread instead of the main thread? Long Explanation: Current logging calls with AsyncAppender ...
Pawan Patel's user avatar
0 votes
0 answers
10 views

Logback Set Interval and cronExpression programmatically

In my app. I need to create Logger dynamically. And I use logback and following code for logger creation: public void test() { LoggerContext context = (LoggerContext) LoggerFactory....
Bondar Anton's user avatar
0 votes
0 answers
88 views

How to Resolve SLF4J Compatibility Issues with Logback 1.5 and Logback 1.2 Dependencies

I'm currently upgrading the hapi-fhir version to 6.8.8, which has upgraded slf4j-api to 2.x. This new version uses the ServiceLoader mechanism for class loading. My application uses Logback 1.5, which ...
Jonny's user avatar
  • 83
0 votes
0 answers
9 views

how to dynamic modify logback SiftingAppender's appender encoder

I want to print different task's log to itself log file. so I use logback SiftingAppender + MDC.put. this is my xml configuration <?xml version="1.0" encoding="UTF-8"?> <...
hehe's user avatar
  • 387
0 votes
0 answers
20 views

What is the slf4j equivalent of logger.getAppender? [duplicate]

I'm trying to change a codebase from using log4j to slf4j. We have a log4j.xml with appenders like this <appender name="DefaultAppender" class="org.apache.log4j.ConsoleAppender&...
Chris A's user avatar
  • 1,081
0 votes
0 answers
18 views

unable to get logger for spring boot log groups

application.properties logging.level.root=info logging.level.test=warn logging.level.mygroup=error logging.group.mygroup=com.aaa.bbb java code @Slf4j //... Logger logger = (Logger) LoggerFactory....
abc's user avatar
  • 1
0 votes
1 answer
352 views

Log4j update from 2.23.1 to 2.24.0/1 -> logging gone

I have a big and old legacy project where we updated to log4j 2 very painfully and we use a lot of bridges. <!-- LOGGING --> <dependency> <...
Ande Hofer's user avatar
0 votes
2 answers
126 views

How can I prevent duplicate log messages using Log4j and SLF4J in a Java application?

I'm working on a Java application that uses SLF4J for logging and Log4j for the underlying logging implementation. The application frequently logs repetitive messages in quick succession, leading to ...
aj.savvi's user avatar
0 votes
0 answers
31 views

Slf4j logging an error from exec-maven-plugin

I noticed this in my Maven build logs [ERROR] org.codehaus.mojo.exec.ExecMojo - SLF4J(I): Connected with provider of type [ch.qos.logback.classic.spi.LogbackServiceProvider] What does it mean and why ...
caduceus's user avatar
  • 1,818
0 votes
1 answer
82 views

Quarkus: Multiple SLF4j bindings found but can not be located

In my quarkus java application i get the following message from slf4j upon launch: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/.../quarkus-app/lib/...
Jimbo's user avatar
  • 1
0 votes
0 answers
26 views

org.slf4j.Logger SystemErr in console and create file .log

I am developing the following class for Java Version 8: import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public ...
Jesus's user avatar
  • 3
1 vote
1 answer
83 views

Dynamically set DEBUG or INFO logging level per request based on request header in reactive Spring Boot with Log4j2

I'm working on a Reactive Spring Boot application that uses Log4j2 as the logging framework. By default, my application logs at the INFO level, and I set the logging level in the application.yml I ...
Rahul verma's user avatar
0 votes
0 answers
53 views

Logback daily log rollover leads to main log file removed and .tmp file left behind

We have developed a reactive web application using Spring boot 2.7.18 that uses logback 1.2.13 along with Slf4j for logging. The application runs on linux server and generates application and access ...
ksh's user avatar
  • 43
0 votes
1 answer
55 views

Is there a way to write separate logs for every fork from failsafe / surefire maven plugins?

We use maven-failsafe-plugin for running integration tests concurrently with <forkCount>, so we will have multiple JVMs in different processes running tests in parallel. The failsafe plugins ...
D. Schmidt's user avatar
0 votes
1 answer
112 views

What is the way to send structured log fields with log4j?

With slf4j I can do as follows: logger.atInfo() .setMessage("My message") .addKeyValue("foo", "bar") .addKeyValue("code", 42) .log() Which, when used ...
greatvovan's user avatar
  • 3,097
0 votes
0 answers
80 views

Log didin't write into filename that specified in log4j2-spring.xml file

Spring boot version 3.3.3, in my linux system I will have two tomcat instance under /opt, one is called /opt/tomcat (which is the dev environment, specified in conf/catalina.properties with spring....
Vincent Zheng's user avatar
0 votes
1 answer
217 views

How to pass MDC data from main thread to webserver http threads

I'm using Spring Boot and MDC to log additional context with each log entry in my REST API application. I use MDC in the main thread, but the data is not passed to the http threads that are created ...
steros's user avatar
  • 1,924
0 votes
0 answers
43 views

Title: How to Override Logback's DBAppender Tables and Use Custom Tables for Logging?

I am trying to customize the DBAppender class in Logback to use my own database tables for logging instead of the default ones(LOGGING_EVENT, LOGGING_EVENT_PROPERTY, and LOGGING_EVENT_EXCEPTION). ...
srinisprojects77's user avatar
0 votes
1 answer
52 views

How to configure slf4j and logback to allow one class to log to a separate file?

I have one Java class that is multithreaded and I want it to log to a separate file. I'm using Dropwizard which uses logback and is configured in my YAML file like this: logging: # The default ...
user2395365's user avatar
  • 2,129
0 votes
0 answers
13 views

How can I setup SLF4J programmatically inside one class so that class can log to its own file? [duplicate]

Hi I have one simple Threaded class (implements Runnable). How can I programmatically configure it to log this class only to a file e.g. /tmp/ThisClass.log?
user2395365's user avatar
  • 2,129
0 votes
2 answers
35 views

Why does dnsjava requires slf4j and logback?

So I'm (trying) developing a kotlin console application, where the user can sign up with an email, and in order to validate this email I use dnsjava library, but that requires me to use the slf4j and ...
r0ck-b0tt0m's user avatar
1 vote
0 answers
120 views

Getting error "Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory" while executing testng suite

I was trying to execute simple TestNG script with new setup of Eclipse with Selenium. Although with the same setup I am able to run other Java classes but when trying to run the TestNG suite I am ...
Nish04's user avatar
  • 11
0 votes
0 answers
28 views

How to switch on INFO messages on Spring boot console - Eclipse project

I am finding it difficult to debug my spring boot mvc application which used to show the INFO/Warning/Error messages some time ago. I did play with the project settings/configs some time ago and it ...
Sudesh's user avatar
  • 67
0 votes
1 answer
357 views

Catch all ERROR level logs to count them with Micrometer

I am integrating my Spring Boot application with Micrometer (and Prometheus and Grafana). I would like to have a Micrometer counter that collects and shows me info (when the exception appeared) about ...
zappee's user avatar
  • 22.5k
0 votes
0 answers
201 views

SLF4J: Class path contains multiple SLF4J providers

I have the next gradle configuration: configurations { all { // Exclude Spring's default logging framework exclude group: 'org.springframework.boot', module: 'spring-boot-starter-...
rasilvap's user avatar
  • 2,129
0 votes
0 answers
19 views

SLF4j is not working with log4j in Spring application when we have logj.xml in external folder

I have slf4j-api, slf4j-log4j12(2.0.7) and log4j(1.2.17)dependencies in my pom.xml along with spring 5.3.18 and sample code also in applicationcontext.xml I have below configuration which is working ...
pushpendra patel's user avatar
1 vote
0 answers
82 views

mockserver causes dependency collision in springboot test

Summary When running a springboot test, I get dependency collision, which I can't get rid of. Details My build.gradle.kts includes the following line: testImplementation("org.mock-server:...
Nadav's user avatar
  • 1,110
1 vote
2 answers
165 views

logback logger (1.5.0) with Eclipse 4.31 -> No SLF4J providers were found

I use eclipse 4.31 with slf4j.api 2.0.12 and ch.qos.logback.classic 1.5.0. But if i want to log something i get following: SLF4J(W): No SLF4J providers were found. SLF4J(W): Defaulting to no-operation ...
Holzmacher's user avatar
0 votes
2 answers
152 views

Why I am getting this error? - SLF4J: Class path contains multiple SLF4J bindings

Error :- SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/rm694/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/...
Roshan M's user avatar
0 votes
0 answers
34 views

Trino: Exception is not logged (slf4j) in org.eclipse.jetty.io.AbstractConnection class

I have Trino running and sometimes I have messages like: http-worker-000 org.eclipse.jetty.io.AbstractConnection Failed callback Trino uses jetty for http connections. I have examined Source code ...
Cherry's user avatar
  • 33.3k
4 votes
0 answers
177 views

Access underlying SLF4J Logger from oshai.kotlin-logging KLogger?

I'm migrating my Kotlin project to use oshai's kotlin-logging. I am using a legacy library which has dependency on SLF4J Logger, but KLogger in oshai's kotlin-logging doesn't inherit it any more. ...
HViktor's user avatar
  • 41
0 votes
0 answers
43 views

LogstashTcpSocketAppender behind a proxy

We need to configure a net.logstash.logback.appender.LogstashTcpSocketAppender to connect to DataDog, however, the server that needs to send out these logs only works with a proxy. We are running on ...
Arcturus's user avatar
  • 27k
0 votes
0 answers
68 views

How can I override the logging property of a specific package in spring boot?

I understand that i am able to set the logging level as follows: logging.level.root=INFO logging.level.com.mypackage=TRACE I want to have trace logging enabled on my local environment but i have a ...
Samuel's user avatar
  • 329
0 votes
1 answer
85 views

How to disable SLF4 in Sqldelight?

I am using sqldelight v2.0.1 with sqlite on the JVM. When I run the application, I always get the following log lines: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: ...
Essay97's user avatar
  • 852
0 votes
1 answer
372 views

MDC not logged when using SLF4J and Log4J2

I'm trying to log MDC using a json formatter in a Wildfly application. I'm hoping to see all of the MDC keys and their values in each of the logs after setting the MDC values. I don't want to use ...
user1022022's user avatar
0 votes
0 answers
48 views

How to setup DuplicateMessageFilter for a single appender

I have a situation where I only want to use the turbo filter DuplicateMessageFilter for a single appender. (among console and file, only for console). How can I set it up? I can only think of create a ...
user25506549's user avatar
-1 votes
1 answer
64 views

Setting logger for com.mongodb.internal.diagnostics.logging.SLF4JLogger does not work

Running with Spring Boot, I get logs like this c.m.i.d.l.SLF4JLogger : Command "insert" started on database "test" using a connection with driver-generated ID 3 and server-...
NealeU's user avatar
  • 1,313
0 votes
0 answers
163 views

SLF4J and Java 11 error while spark version upgrade

I am facing this error "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/...
Anonymous's user avatar
0 votes
2 answers
69 views

@Slf4j SimpleLogger change log level from code

I am using @Slf4j annotation with SimpleLogger. I have properties defined in simplelogger.properties as below: org.slf4j.simpleLogger.defaultLogLevel=INFO org.slf4j.simpleLogger.showDateTime=true org....
Akash Shinde's user avatar
2 votes
0 answers
51 views

syslog in logback + springboot doesnt't work for me

const Syslog = require('simple-syslog-server') ; // Create our syslog server with the given transport const options = {} ; const address = 'localhost' ; // Any const port = 514 ; const listen = {...
Kimin Lee's user avatar
-1 votes
1 answer
124 views

LoggerContextListener order establishment no longer honored after upgrading to SLF4J v2/Logback

I am going to do my best to explain this but it is fairly complicated. I work on a project that wants people to be able to override logback.xml settings using a java profile and properties. For ...
JGleason's user avatar
  • 3,836
2 votes
1 answer
99 views

How to correlate REST errors with log entries using slf4j?

In backend code, when a REST endpoint method produces an exception, the endpoint should return a payload with an appropriate http error status, such as 500. It is also a good practice that the payload ...
Adam Wise's user avatar
  • 2,240
1 vote
0 answers
163 views

An internal error occurred during: "Check Configuration". loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory

I have installed the cucumber plugin and after that whenever I am launching Eclipse IDE it is not responding. Getting the below error: An internal error occurred during: "Check Configuration&...
Ansuman Prasad Pati's user avatar

1
2 3 4 5
69