Skip to content

Best Practices

Michal Valny edited this page Mar 20, 2017 · 10 revisions

1. Use logger instead of printing to console

Please switch to logger instead of:

System.out.println("annoying message");

Usage is easy:

// initialize logger

private Logger logger = LoggerFactory.getLogger(MyClass.class);

logger.info("less annoying message");