I have the following example code :
import java.util.logging.Logger;
public class LoggingExample {
private static final Logger LOGGER = Logger.getLogger(
Thread.currentThread().getStackTrace()[0].getClassName() );
public static void main(String[] args) {
LOGGER.setLevel(Level.ALL);
LOGGER.info("Logging an INFO-level message");
LOGGER.fine("Logging an INFO-level message2");
}
}
With the output to console of:
05/06/2014 12:07:09 ztesting.Loger.LoggingExample main
INFO: Logging an INFO-level message
And I have several question:
- The entire output is in red, can I set the output to be in different colors according to the level?
- Can I not display the first line "05/06/2014 12:07:09 ztesting.Loger.LoggingExample main"
- Can I block the output to console completely, meaning I would only set output to a log file.
- Not as important, but why does the fine row does not display ?
P.S. I m using netbeans 6.9
ALSO tried using the following links and it got me no where
Is there any way to remove the information line from java.util.logging.Logger output?
How do I get java logging output to appear on a single line?
Thanks for any help ..