de.intarsys.tools.logging.SDC Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.logging;
/**
* A "simple device context".
*
* With this idiom you can associate a simple tag with the current thread that
* is referenced from a log formatter when publishing.
*
*/
public class SDC {
final static private ThreadLocal message = new ThreadLocal();
static public void clear() {
message.remove();
}
static public String get() {
return message.get();
}
static public void set(String value) {
message.set(value);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy