Logger: logp(Level level, String sourceClass, String sourceMethod, String msg)
import java.util.logging.Level;
import java.util.logging.Logger;
public class Main {
private static Logger logger = Logger.getLogger("InfoLogging2");
public static void main(String[] args) {
logger.logp(Level.INFO, "InfoLogging2", "main", "Logging an INFO-level message");
}
}
Related examples in the same category