From logback-dev at qos.ch Tue Jul 4 11:31:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 4 Jul 2023 11:31:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1754: OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: logback / LOGBACK-1754 [Open] OverlappingFileLockException when using prudent mode ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1754 ============================== Issue created ------------------------------ Christian Habermehl created this issue on 04/Jul/23 11:19 Summary: OverlappingFileLockException when using prudent mode Issue Type: Bug Affects Versions: 1.4.8 Assignee: Logback dev list Components: logback-core Created: 04/Jul/23 11:19 Environment: Windows 10 openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment JBR-17.0.5+1-653.14-jcef (build 17.0.5+1-b653.14) OpenJDK 64-Bit Server VM JBR-17.0.5+1-653.14-jcef (build 17.0.5+1-b653.14, mixed mode) Debian openjdk version "17.0.2" 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-86) OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing) Priority: Major Reporter: Christian Habermehl Description: Hi, after moving from logback 1.2.12 to 1.4.8 I ran into OverlappingFileLockExceptions when using prudent mode. {code:java} ERROR in ch.qos.logback.core.rolling.RollingFileAppender[GENERAL] - Appender [GENERAL] failed to append. java.nio.channels.OverlappingFileLockException     at java.nio.channels.OverlappingFileLockException     at     at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)     at     at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)     at     at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1276)     at     at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1089)     at     at ch.qos.logback.core.FileAppender.safeWrite(FileAppender.java:254)     at     at ch.qos.logback.core.FileAppender.writeOut(FileAppender.java:279)     at     at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:228)     at     at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:253)     at     at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:102)     at     at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:85)     at     at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)     at     at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:272)     at     at ch.qos.logback.classic.Logger.callAppenders(Logger.java:259)     at     at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:426)     at     at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)     at     at ch.qos.logback.classic.Logger.info(Logger.java:584)     at     at LogbackTest$LoggerThread.run(LogbackTest.java:47) {code} This is my logback.xml {code:xml}                         applog/my-log-%d\{yyyy-MM-dd}.log             120                             %date\{HH:mm:ss.SSS} [%level] %logger\{0} [%thread] [%class\{3}:%line] : %msg%n                 true                     {code} and this is my test class: {code:java} import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LogbackTest {     private static final int THREADS = 20;     private void runTest() {         CountDownLatch latch = new CountDownLatch(THREADS);         List threads = new ArrayList<>(THREADS);         for (int i = 0; i < THREADS; i++) {             LoggerThread thread = new LoggerThread(latch, "message from thread " + i);             thread.start();             threads.add(thread);         }         for (Thread thread : threads) {             try {                 thread.join();             } catch (InterruptedException e) {                 Thread.currentThread().interrupt();                 throw new RuntimeException(e);             }         }     }     public static void main(String... args) {         new LogbackTest().runTest();     }     private static final class LoggerThread extends Thread {         private static final Logger LOG = LoggerFactory.getLogger(LoggerThread.class);         private final CountDownLatch latch;         private final String message;         LoggerThread(CountDownLatch latch, String message) {             setDaemon(false);             this.latch = latch;             this.message = message;         }         @Override         public void run() {             latch.countDown();             LOG.info(message);         }     } } {code} I never had this problems with logback 1.2 (the test class runs without problems when using 1.2). I didn't change the logback.xml and the jvm is the same. Here is a stack trace when the RollingFileAppender is called with 1.2.12: {code:java}     at ch.qos.logback.core.recovery.ResilientOutputStreamBase.write(ResilientOutputStreamBase.java:52)       at java.io.OutputStream.write(OutputStream.java:127)       at ch.qos.logback.core.OutputStreamAppender.writeBytes(OutputStreamAppender.java:199)       at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:231)       at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:235)       at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:102)       at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84)       at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)       at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)       at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)       at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)       at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)       at ch.qos.logback.classic.Logger.info(Logger.java:579)       at LogbackTest$LoggerThread.run(LogbackTest.java:47) {code} ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Tue Jul 4 12:04:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 4 Jul 2023 12:04:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 799 bytes Desc: not available URL: From logback-dev at qos.ch Wed Jul 5 17:54:45 2023 From: logback-dev at qos.ch (logback developers list) Date: Wed, 05 Jul 2023 11:54:45 -0400 Subject: [logback-dev] regarding LOGBACK-1746 In-Reply-To: References: Message-ID: Ceki has this behavior been intentionally changed between 1.2 and 1.4? BR, Richard On 6/21/2023 2:35:36 PM, Richard Sand wrote: Hi all, Has anyone else encountered this issue with the change in when resolution of a JNDI variable occurs? Or is there an alternative configuration that can still achieve what was working in 1.2? Basically I'm using a JNDI variable to define the path to a config file to include:      The logback logs show: 11:12:45,716 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.6 11:12:45,776 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil at 354c986c - Adding file:/D:/IDFC/SSORest-3.1-casso/tomcat/bin/appHome_IS_UNDEFINED/conf/logback-ssorest.xml to configuration watch list. 11:12:45,776 |-WARN in ch.qos.logback.core.joran.action.IncludeAction - Failed to open file:/D:/IDFC/SSORest-3.1-casso/tomcat/bin/appHome_IS_UNDEFINED/conf/logback-ssorest.xml 11:12:45,823 |-INFO in ch.qos.logback.core.model.processor.InsertFromJNDIModelHandler - Setting variable [appHome] to [../..] in [LOCAL] scope Any thoughts? BR, Richard [431881a4-a923-4738-a6fe-3a9eece779d9] -------------- next part -------------- An HTML attachment was scrubbed... URL: From logback-dev at qos.ch Fri Jul 7 13:00:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 13:00:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 7 13:01:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 13:01:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 7 13:07:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 13:07:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1755: potential resource leak bug in test code In-Reply-To: References: Message-ID: logback / LOGBACK-1755 [Open] potential resource leak bug in test code ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1755 ============================== Issue created ------------------------------ Alfusainey Jallow created this issue on 07/Jul/23 12:55 Summary: potential resource leak bug in test code Issue Type: Bug Assignee: Logback dev list Components: logback-core Created: 07/Jul/23 12:55 Priority: Minor Reporter: Alfusainey Jallow Description: There is a potential resource leak bug in the implementation of the CompressTest{{{}#copy(){}}} method. This method copies the contents of one file to another. However, the input and output streams will not be closed if an exception is thrown during the {{write}} operation. One solution is to use try-with-resources so that it is guaranteed that the streams will be close in the event an exception is thrown.   {code:java} public static void copy(File src, File dst) throws IOException {   try (InputStream in = new FileInputStream(src);        OutputStream out = new FileOutputStream(dst)) {        // Transfer bytes from in to out        byte[] buf = new byte[1024];        int len;        while ((len = in.read(buf)) > 0) {          out.write(buf, 0, len);        }    } } {code} The priority for this issue is minor since it affects only test code. Can someone kindly confirm if this is an issue? *Context* We came across this issue while investigating open-source projects to see if they contain code that is similar to (or reused from) Stack Overflow and whether the code on Stack Overflow underwent any bug or security fixes. We found that the code in the {{{}CompressTest{}}}{{{}{}}}{{{}#copy(){}}} method is somewhat similar to the one in the first version of [this answer|https://stackoverflow.com/revisions/9293885/1]. The issue was subsequently fixed in the [second version|https://stackoverflow.com/revisions/9293885/2], however, the fix is not reflected in this method.   ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Fri Jul 7 16:54:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 16:54:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1756: Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: logback / LOGBACK-1756 [Open] Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1756 ============================== Issue created ------------------------------ Jim Talbut created this issue on 07/Jul/23 16:42 Summary: Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter Issue Type: Improvement Affects Versions: 1.4.8 Assignee: Logback dev list Components: logback-core Created: 07/Jul/23 16:42 Environment: Currently LoggerContext uses LogbackMDCAdapter. There doesn't seem to be much need for it to do that rather than just using the MDCAdapter interface. Using LogbackMDCAdapter ties it to the implementation and makes it difficult to replace, whereas using the interface would make it easy to replace. As a Vertx user the thread-local storage of MDCAdapter isn't a useful implementation for me, so I'd like to be able to  replace it. Priority: Minor Reporter: Jim Talbut ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Fri Jul 7 16:59:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 16:59:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 7 17:15:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 17:15:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 7 17:20:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 17:20:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 7 23:47:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 7 Jul 2023 23:47:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1749) In the new JsonEncoder, the throwable's cause(s) are not included. In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Sat Jul 8 07:07:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Sat, 8 Jul 2023 07:07:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1144 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Mon Jul 10 16:34:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Mon, 10 Jul 2023 16:34:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1746) insertFromJNDI resolves AFTER include in 1.4.x In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3023 bytes Desc: not available URL: From logback-dev at qos.ch Tue Jul 11 11:49:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 11 Jul 2023 11:49:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1757: Document strategies for Joran extensions In-Reply-To: References: Message-ID: logback / LOGBACK-1757 [Open] Document strategies for Joran extensions ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1757 ============================== Issue created ------------------------------ Ceki Gülcü created this issue on 11/Jul/23 11:38 Summary: Document strategies for Joran extensions Issue Type: Sub-task Assignee: Logback dev list Created: 11/Jul/23 11:38 Priority: Major Reporter: Ceki Gülcü ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Tue Jul 11 16:00:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 11 Jul 2023 16:00:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Tue Jul 11 20:23:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 11 Jul 2023 20:23:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1746) insertFromJNDI resolves AFTER include in 1.4.x In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Tue Jul 11 20:59:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 11 Jul 2023 20:59:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1735) ILoggingEvent#getInstant should return `Instant.ofEpochMills(getTimeStamp())` instead of `null` as a better alternative In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Tue Jul 11 21:02:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 11 Jul 2023 21:02:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1735) ILoggingEvent#getInstant should return `Instant.ofEpochMills(getTimeStamp())` instead of `null` as a better alternative In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Thu Jul 13 09:09:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Thu, 13 Jul 2023 09:09:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1758: loggerContext NPE in classic.LoggerContext.getMDCAdapter() In-Reply-To: References: Message-ID: logback / LOGBACK-1758 [Open] loggerContext NPE in classic.LoggerContext.getMDCAdapter() ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1758 ============================== Issue created ------------------------------ Thomas Haines created this issue on 13/Jul/23 8:58 Summary: loggerContext NPE in classic.LoggerContext.getMDCAdapter() Issue Type: Bug Affects Versions: 1.4.8 Assignee: Logback dev list Components: logback-classic Created: 13/Jul/23 8:58 Priority: Major Reporter: Thomas Haines Description: Have pushed a repo with single test case demonstrating the issue: [https://bitbucket.org/tomhaines/logback-npe-148-mdc/src/master/]   Starting in 1.4.8, the following NPE occurs: {code:java} Cannot invoke "ch.qos.logback.classic.LoggerContext.getMDCAdapter()" because "this.loggerContext" is null java.lang.NullPointerException: Cannot invoke "ch.qos.logback.classic.LoggerContext.getMDCAdapter()" because "this.loggerContext" is null at ch.qos.logback.classic.spi.LoggingEvent.getMDCPropertyMap(LoggingEvent.java:407) at com.logback.example.StackJsonLayout.createContextNode(StackJsonLayout.java:74) at com.logback.example.StackJsonLayout.doLayout(StackJsonLayout.java:60) at com.logback.example.StackJsonLayoutTest.testBasic(StackJsonLayoutTest.java:22){code} To replicate, run {code:java} ./gradlew test {code} If you change back to logback 1.4.7 via gradle dependencies, the test passes.   ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Fri Jul 14 01:34:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 14 Jul 2023 01:34:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1758) loggerContext NPE in classic.LoggerContext.getMDCAdapter() In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Fri Jul 14 01:34:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 14 Jul 2023 01:34:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1758) loggerContext NPE in classic.LoggerContext.getMDCAdapter() In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: From logback-dev at qos.ch Mon Jul 17 12:45:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Mon, 17 Jul 2023 12:45:00 +0200 (CEST) Subject: [logback-dev] [JIRA] Updates for LOGBACK-1759: LoggerContext.reset() closes Jansi-OutputStream In-Reply-To: References: Message-ID: logback / LOGBACK-1759 [Open] LoggerContext.reset() closes Jansi-OutputStream ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1759 ============================== Issue created ------------------------------ Wolfgang F. Riedl created this issue on 17/Jul/23 12:34 Summary: LoggerContext.reset() closes Jansi-OutputStream Issue Type: Bug Affects Versions: 1.3.8 Assignee: Logback dev list Components: logback-core Created: 17/Jul/23 12:34 Environment: h1. Description For my tests, I am reloading my Logback configuration via the following code snippet: {code:java} loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory configurator = new JoranConfigurator() configurator.setContext(loggerContext) loggerContext.reset() configurator.doConfigure(runResourcesPath.resolve("path.xml").toFile) {code} However, a call to loggerContext.reset() will, if configured with Jansi, call close() on the OutputStream of a ConsoleAppender (c.f. OutputStreamAppender.closeOutputStream()). This will prevent any more writing being done to this stream (i.e. the Jansi stream). h1. Expected Behaviour On loggerContext.reset(), a ConsoleAppender configured with Jansi should not close its output stream (as this is the Jansi stream). If configured without Jansi the stream can be closed without problems. h1. Environment * Logback: 1.3.7 and 1.3.8 * Jansi: 1.8 and 2.4.0 * Java: 1.8 and 11 * Windows 10 Priority: Critical Reporter: Wolfgang F. Riedl ============================== This message was sent by Atlassian Jira (v9.6.0#960000-sha1:a3ee8af) From logback-dev at qos.ch Mon Jul 17 17:47:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Mon, 17 Jul 2023 17:47:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1746) insertFromJNDI resolves AFTER include in 1.4.x In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3023 bytes Desc: not available URL: From logback-dev at qos.ch Tue Jul 18 10:18:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Tue, 18 Jul 2023 10:18:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1144 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Wed Jul 19 16:49:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Wed, 19 Jul 2023 16:49:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 799 bytes Desc: not available URL: From logback-dev at qos.ch Wed Jul 19 17:15:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Wed, 19 Jul 2023 17:15:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1754) OverlappingFileLockException when using prudent mode In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 403 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 799 bytes Desc: not available URL: From logback-dev at qos.ch Sun Jul 23 11:36:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Sun, 23 Jul 2023 11:36:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Sun Jul 23 11:41:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Sun, 23 Jul 2023 11:41:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: From logback-dev at qos.ch Thu Jul 27 07:26:04 2023 From: logback-dev at qos.ch (logback developers list) Date: Thu, 27 Jul 2023 15:26:04 +1000 Subject: [logback-dev] Setting MDCAdapter Message-ID: Hi, I've come across this issue recently https://github.com/line/armeria/issues/5045 where Armeria tries to set a non-thread-local MDCAdapter. This broke in logback 1.4.8 where MDCAdapter is created at logger creation time. Was wondering if there's something to fix in Logback to make this possible without a hacky workaround? Thanks, Ric Mariano -------------- next part -------------- An HTML attachment was scrubbed... URL: From logback-dev at qos.ch Fri Jul 28 23:23:00 2023 From: logback-dev at qos.ch (logback developers list) Date: Fri, 28 Jul 2023 23:23:00 +0200 (CEST) Subject: [logback-dev] [JIRA] (LOGBACK-1756) Change LoggerContext to use MDCAdapter instead of LogbackMDCAdapter In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 460 bytes Desc: not available URL: