Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.logging.Level;
- import java.util.logging.Logger;
- public class LoggingApp {
- private Logger log = Logger.getLogger(this.getClass().getName());
- public static void main(String[] args) {
- LoggingApp app = new LoggingApp();
- app.hello();
- }
- public LoggingApp() {
- System.setProperty("java.util.logging.SimpleFormatter.format",
- "%1$tF %1$tT.%1$tL %4$s, %2$s: %5$s%6$s%n");
- }
- public void hello() {
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- log.info("Hello, world!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement