Yes I have checked that HOWTO page (and other pages), but that's not my problem. My problem is that I have 2 threads running, and I want them to log to different files. I think I have code that creates a new logger in the second thread, but all the output goes to both files (in both threads).
One thread uses the DCMNET_XXX macros, and the other thread uses my own macros, yet all the output goes to the DCMNET_XXX output file as well.
so if I understand this correctly, you have the following situation:
Some code logs to the ors.http logger
Some code logs to the dcmtk.dcmnet logger
There is a FileAppender attached to the ors.http logger
There is another FileAppender attached to the root logger
Since each logger "gives" log messages to its parents, log messages that are sent to the ors.http logger also go to the ors logger and the root logger. This last one will then cause this to be written to the file. (But earlier, the ors.http-logger should have written it to your other log file. So do you get log messages in both files...?)
You can disable this "pass log messages towards the root of the hierachy"-behavior via dcmtk::log4cplus::Logger::getInstance(HTTP_LOGGER_NAME).setAdditivity(false).