S
scoffer
Hi all,
i need to change the Formatter for the Logger that write on the console.
My code is something like that:
logHandler = new FileHandler("RecVenduto.log", true);
theLogger.addHandler(logHandler);
theLogger.setLevel(logLevel);
Handler hdl [] = theLogger.getHandlers();
for (int cnt=0; cnt < hdl.length; cnt++) {
hdl[cnt].setFormatter(new MyCustomFormatter());
hdl[cnt].setLevel(logLevel);
}
This code change the Formatter for the FileHandler, but the console output
don't change.
Can I set different Levels for FileHandler and console output??
Thanks in advance.
Daniele B.
Software Specialist
i need to change the Formatter for the Logger that write on the console.
My code is something like that:
logHandler = new FileHandler("RecVenduto.log", true);
theLogger.addHandler(logHandler);
theLogger.setLevel(logLevel);
Handler hdl [] = theLogger.getHandlers();
for (int cnt=0; cnt < hdl.length; cnt++) {
hdl[cnt].setFormatter(new MyCustomFormatter());
hdl[cnt].setLevel(logLevel);
}
This code change the Formatter for the FileHandler, but the console output
don't change.
Can I set different Levels for FileHandler and console output??
Thanks in advance.
Daniele B.
Software Specialist