Skip to content

Instantly share code, notes, and snippets.

@vazexqi
Created February 24, 2013 16:58
Show Gist options
  • Save vazexqi/5024557 to your computer and use it in GitHub Desktop.
Save vazexqi/5024557 to your computer and use it in GitHub Desktop.
sfl4j logging with Groovy using Gradle to manage dependencies (MyExample.groovy) See http://vazexqi.github.com/posts/2013/02/24/groovy-sfl4j.html
import groovy.util.logging.Slf4j
@Slf4j
class MyExample {
MyExample() {
log.info 'Instantiated MyExample'
}
def status() {
log.debug 'Still alive...'
}
static main(args) {
def ex = new MyExample()
while(true) {
ex.status()
sleep(30000) // Sleep 30 seconds
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment