Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. import java.util.logging.Level;
  2. import java.util.logging.Logger;
  3.  
  4.  
  5. public class LoggingApp {
  6.  
  7. private Logger log = Logger.getLogger(this.getClass().getName());
  8.  
  9. public static void main(String[] args) {
  10. LoggingApp app = new LoggingApp();
  11. app.hello();
  12. }
  13.  
  14. public LoggingApp() {
  15. System.setProperty("java.util.logging.SimpleFormatter.format",
  16. "%1$tF %1$tT.%1$tL %4$s, %2$s: %5$s%6$s%n");
  17. }
  18.  
  19. public void hello() {
  20. log.info("Hello, world!");
  21. log.info("Hello, world!");
  22. log.info("Hello, world!");
  23. log.info("Hello, world!");
  24. log.info("Hello, world!");
  25. log.info("Hello, world!");
  26. log.info("Hello, world!");
  27. log.info("Hello, world!");
  28. log.info("Hello, world!");
  29. log.info("Hello, world!");
  30. log.info("Hello, world!");
  31.  
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement