Logback has a special appender called SiftingAppender which provides a very nice solution to the type of problems you describe. A SiftingAppender can be used to separate (or sift) logging according to any runtime attribute, including thread id.
More Related Contents:
- How to stop a java thread gracefully?
- Handling exceptions from Java ExecutorService tasks
- Swing animation running extremely slow
- java.lang.OutOfMemoryError: Java heap space
- How to synchronize a static variable among threads running different instances of a class in Java?
- How to Create a Custom Appender in log4j2?
- Are static variables shared between threads?
- Why should wait() always be called inside a loop
- Java double checked locking
- Is it safe to get values from a java.util.HashMap from multiple threads (no modification)?
- Distinguishing between Java threads and OS threads?
- Javafx: Difference between javafx.concurent and Platform.runLater?
- How are Threads allocated to handle Servlet request?
- How can the wait() and notify() methods be called on Objects that are not threads?
- Java volatile modifier and synchronized blocks
- How to make another thread sleep in Java
- Setting priority to Java’s threads
- How do I properly do a background thread when using Spring Data and Hibernate?
- Java – creating a new thread
- Java Multithreading concept and join() method
- How to specify Log4J 2.x config location?
- Is it possible to force an existing Java application to use no more than x cores?
- Handling Exceptions for ThreadPoolExecutor
- Java Synchronization [closed]
- Is synchronization within an HttpSession feasible?
- Is the pre-increment operator thread-safe?
- CopyOnWriteArrayList throwing CurrentModificationException
- who and when notify the thread.wait() when thread.join() is called?
- Dynamic Thread Pool
- JAVAFX : why wait cursor needs a new thread?