-
Improvement
-
Resolution: Fixed
-
Minor
The debug messages in the plug-in are quite useful. But as we add more, the code will become bloated, and then we may want to distinguish different debug messages (like per level), and then we would be re-writing a logging API, which already exists and is available for Jenkins plug-ins.
We could simply add a logger as follows in the builder:
private static final Logger LOGGER = Logger.getLogger("com.waytta.saltstack");
Which is using the Java Util Logging API (https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html). This way we can log debug, info, warnings, etc, and users are able to manage the logging level and what they see through Jenkins web interface (https://wiki.jenkins-ci.org/display/JENKINS/Logging).