This content has been marked as final. Show 3 replies
That config data is in the wrong format. You use a comma-separated list of formatters, etc. You don't list things twice to get a second handler/formatter/whatever; presumably that would just overwrite the previous assignment. Actually I think there are other problems with that format but I can't recall the details; google for the spec and experiment.
I picked up this format from the jre/lib/logging.properties, that has two handlers, consoleHandler and fileHandler.
Yes, it is overwriting it.
In the code, I can always add multiple FileHandlers to the Logger using,
I wanted to know how to do that using the config file.
myLogger = new Logger("myLog"); FileHandler bakendLog = new FileHandler("bk%u.log"); bakendLog.setFilter(new BkendLogFilter()); myLogger.addHandler(bakendLog); FileHandler eventLog = new FileHandler("event%u.log"); eventLog.setFilter(new EventLogFilter()); myLogger.addHandler(eventLog); FileHandler uiLog = new FileHandler("ui%u.log"); uiLog.setFilter(new UILogFilter()); myLogger.addHandler(uiLog);