You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MyFormatter.java 643B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package kommunikation.logger;
  7. import java.util.logging.LogRecord;
  8. import java.util.logging.SimpleFormatter;
  9. /**
  10. *
  11. * @author nobody
  12. */
  13. public class MyFormatter extends SimpleFormatter
  14. {
  15. public MyFormatter()
  16. {
  17. }
  18. @Override
  19. public String format(LogRecord record)
  20. {
  21. String str = "| " + record.getMillis() + " | " + record.getLevel()+ " | " + record.getSourceClassName() + " | " + record.getMessage() + " |\n";
  22. return str;
  23. }
  24. }