OnJava8-Examples/logging/InfoLogging2.java

16 lines
442 B
Java
Raw Normal View History

2015-05-05 11:20:13 -07:00
//: logging/InfoLogging2.java
// Guaranteeing proper class and method names
import java.util.logging.*;
public class InfoLogging2 {
private static Logger logger =
Logger.getLogger("InfoLogging2");
public static void main(String[] args) {
2015-05-18 23:05:20 -07:00
logger.logp(Level.INFO, "InfoLogging2",
"main", "Logging an INFO-level message");
2015-05-05 11:20:13 -07:00
}
2015-05-18 23:05:20 -07:00
} /* Output:
May 13, 2015 10:43:36 AM InfoLogging2 main
INFO: Logging an INFO-level message
*///:~