OnJava8-Examples/verifying/InfoLogging.java
Bruce Eckel abf72d0710 Logging section not failing
log4j2.xml is still not being seen, though
2016-08-09 17:51:55 -06:00

20 lines
592 B
Java

// verifying/InfoLogging.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
// {ErrorOutputExpected}
import org.apache.logging.log4j.*;
public class InfoLogging {
private static final Logger logger =
LogManager.getLogger(InfoLogging.class);
public static void main(String[] args) {
logger.info("Logging: INFO-level message");
}
}
/* Output:
___[ Error Output ]___
Jul 27, 2016 10:50:39 AM InfoLogging main
INFO: Logging: INFO-level message
*/