Logging in Groovy with replaceable Logger-implementations

With version 1.8 a great feature got into the release of Groovy: the groovy.util.logging.Slf4j-annotation. With that annotation you can create the logging facade which can be used then at runtime with different logging implementations. In this example I will use „simple logging“, „log4j“ and „logback“ as implementations.