I have a desktop java application that I foresaw that Java logging would be sufficient for. To make the matter simpler I use the java global logger to get logger instead of passing any specific logger name
Logger logger = Logger.getGlobal();
String logFilePath = Config.INSTANCE.getProperty("logFilePath");
FileHandler fileHandler = new FileHandler(logFilePath);
logger.addHandler(fileHandler);
SimpleFormatter formatter = new SimpleFormatter();
fileHandler.setFormatter(formatter);
As you can see above, I am also making changes to the global logger in terms of output file path and the formatter.
My question is about the scope of the global logger, is it globally scoped in terms of the JVM? or globally scoped over the application? and if globally scoped over JVM, should I expect side effects on the applications sharing the same JVM?
Tip:
I have went through this thread In java.util.logging, what is the global logger for? but the comments were not something I could make use of.