James said:
Ah, I should have said - I'm configuring logging from a properties
file, and although I can add two FileHandlers:
handlers= java.util.logging.FileHandler, java.util.logging.FileHandler
I don't see a way to configure those two Handlers differently. Am I
missing something?
If you want to do advanced logging, then us elog4j instead
of java.util.logging !
One possible workaround is:
package february;
import java.io.IOException;
import java.util.logging.FileHandler;
public class FileHandlerA extends FileHandler {
public FileHandlerA() throws IOException, SecurityException {
super();
}
}
package february;
import java.io.IOException;
import java.util.logging.FileHandler;
public class FileHandlerB extends FileHandler {
public FileHandlerB() throws IOException, SecurityException {
super();
}
}
february.MultiLog.level = FINE
handlers = february.FileHandlerA,february.FileHandlerB
february.FileHandlerA.level = FINE
february.FileHandlerA.formatter = java.util.logging.SimpleFormatter
february.FileHandlerA.pattern = C:/log1.log
february.FileHandlerB.level = SEVERE
february.FileHandlerB.formatter = java.util.logging.SimpleFormatter
february.FileHandlerB.pattern = C:/log2.log
Not particular elegant, but it works.
Arne