Skip to main content

Questions tagged [logback]

Modern logging facility for Java-based programs with many new features when compared to Log4J and java.util.logging.

logback
0 votes
0 answers
7 views

Logback creating .tmp files during rollover

I have spring boot app with springboot version - 2.7.18 which has logback version 1.2.12 Now I am facing issue with .tmp files getting created during daily rollover of files. Below is my logback.xml ...
NewBie's user avatar
  • 63
0 votes
1 answer
33 views

How to test that pattern of consoleAppender logback configuration is working using uint tests?

I am very new at logback. I am using logback.xml configuration in my project, that has consoleAppender that use som pattern like <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-...
Vitaly Gavrilchenko's user avatar
0 votes
0 answers
19 views

maxFileSize is not behaving as expected in SizeAndTimeBasedRollingPolicy in logback-1.5.6

I am trying to test the SizeAndTimeBasedRollingPolicy in Logback. The time-based rolling is working fine, but I'm having trouble with the size-based rolling. I expect the file to roll over when it ...
Neha's user avatar
  • 1
0 votes
0 answers
18 views

Sending Traceability Logs to a Different File Than the Default Keycloak Log File

Want to log some traces on a specific file with log rotation. <keycloak.version>21.1.1</keycloak.version> I created a class called TracabilityLogger that logs certain traces I retrieve ...
Nicolas Bourneuf's user avatar
0 votes
0 answers
20 views

Issue with asynchronous logging using Logback on Tomcat

I'm currently facing an issue with logging configuration in my Java web application deployed on Tomcat. I'm using Logback as the logging framework and have configured a ConsoleAppender with <...
pape ndongo's user avatar
0 votes
0 answers
19 views

How to print MDC attribute only if log level is ERROR in dropwizard java app

Idea is to print some context only if there is error logs & not on other log levels like info or trace since it is not useful. I tried using log filters but it didnt help. Reference - https://www....
Jackie Vaswani's user avatar
1 vote
0 answers
54 views

Can I disable default Marker Context (NoMarker) passed implicitly when using play.api.Logger and require a different MarkerContext is always provided?

I am trying to add a unique request id to logs for each request that is made to a rest api. For that I want to pass implicitly a MarkerContext to each logger method called. Currently the NoMarker ...
Stefan Stojkovski's user avatar
0 votes
1 answer
37 views

Masking Sensitive Data in Request Body

I'm working on implementing of lockback in a little spring project. When credentialDTO is passed in login end point, Spring generates a log line with apparent password. 2024-06-27 14:55:37,555 DEBUG [...
Samet Yıldız's user avatar
0 votes
0 answers
16 views

How to avoid logs duplication in a logger having several appenders?

I want to distribute logs to several files depending on a flag in the LoggingEvent. Let's say all log lines with the flag valued to "A", must go to A.log, those with value "B", ...
Mikaël Restoux's user avatar
0 votes
1 answer
72 views

How can I print the nano-seonds in Log Timestamp while logging in Spring Boot 3.3 & java 17 using logback or log4j?

I am trying to print nanosecond precision of the time stamp in the logs for my spring boot app. I am using logback 1.5.6 in Spring Boot 3.3 with Java 17. I looked for different approaches and that ...
Amar Chandu's user avatar
0 votes
1 answer
58 views

logback.xml or logback-spring.xml?

Hy, I work with various project using logback and springboot, and some use a logback.xml file , some use logback-spring.xml file. What is the difference between the 2 ? How to configure one being used ...
sab's user avatar
  • 4,852
1 vote
1 answer
50 views

How to use an external logback.xml

I need to log using an external logback.xml file. Note: I have a spring boot app. If I keep the logback.xml file inside src/main/resources then all works fine. But when I supply it like java -Dlogback....
h h's user avatar
  • 19
0 votes
1 answer
15 views

Caused By: java.lang.LinkageError: loader constraint violation: "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory

I have upgraded the logback-core and logback-classic jar from 1.0.11 version to the 1.3.12. My project also using logback-ext.spring-0.1.1 , which is causing the below issue while restarting the ...
Rauthan's user avatar
  • 51
0 votes
0 answers
11 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
0 votes
0 answers
30 views

How to configure programatically Logback in Groovy?

I have this Groovy Lockback configuration: /* * Copyright (c) Deutsche Post DHL */ package de.deutschepost.adm.logging import ch.qos.logback.classic.Logger import ch.qos.logback.classic....
Petr Kostroun's user avatar

15 30 50 per page
1
2 3 4 5
247