S
Samik R
Hello,
I am using the java Logger api for logging. I want to suppress the default screen messages from using the api. Can anybody help me out?
Following is the code I am using:
// Initiate logging service
Logger MyLogger=Logger.getLogger("");
FileHandler FH=new FileHandler("BundleLog.txt");
FH.setFormatter(new MyLogFormatter());
MyLogger.addHandler(FH);
MyLogger.setLevel(Level.ALL);
Output:
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Connecting to DB: samik
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Running simulation with 3 nodes, Simulation # 0, Repeatation # 1
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: NodeImbalances[0]=0.0
....
I want to get rid of the above lines appearing on screen. The lines with dates etc. do not appear in the file "BundleLog.txt". So the file output is what I want. But I do not want any message on screen.
Thanks for any pointer.
-Samik
I am using the java Logger api for logging. I want to suppress the default screen messages from using the api. Can anybody help me out?
Following is the code I am using:
// Initiate logging service
Logger MyLogger=Logger.getLogger("");
FileHandler FH=new FileHandler("BundleLog.txt");
FH.setFormatter(new MyLogFormatter());
MyLogger.addHandler(FH);
MyLogger.setLevel(Level.ALL);
Output:
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Connecting to DB: samik
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: Running simulation with 3 nodes, Simulation # 0, Repeatation # 1
Dec 28, 2005 9:53:26 PM java.util.logging.LogManager$RootLogger log
INFO: NodeImbalances[0]=0.0
....
I want to get rid of the above lines appearing on screen. The lines with dates etc. do not appear in the file "BundleLog.txt". So the file output is what I want. But I do not want any message on screen.
Thanks for any pointer.
-Samik