Hi Guys,
I am using a wrapper class A which initializes the java.util.logger
static class A {
public static Logger logger;
public static void init(){
logger = Logger.getLogger("test");
}
Now, everywhere in my program I call A.init() and then logger.log("Message+uniqid"). But recently I moved to HTTP servlets and I am having problems.
Basically, If a app is already running and the logger is logging... and someone else runs the app again, the logger from the previous instance stops and starts logging for the second one. Can anyone have a solution to how I should go about fixing this static variable issue?
I can pass the logger into all constructor classes but thats really tedious. Any better solution would be appreciated..