Created
September 5, 2012 16:32
-
-
Save aeg/3639472 to your computer and use it in GitHub Desktop.
Groovy slf4j Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.eiji | |
@Grapes([ | |
@Grab(group='org.slf4j', module='slf4j-log4j12', version='1.6.6'), | |
@Grab(group='ch.qos.logback', module='logback-classic', version='0.9.28') | |
] | |
) | |
import org.slf4j.Logger | |
import org.slf4j.LoggerFactory | |
def logger = LoggerFactory.getLogger(this.class) | |
println logger.getName() | |
logger.trace("TRACE") | |
logger.info("INFO") | |
logger.debug("DEBUG") | |
logger.error("ERROR") | |
println "hello world\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Users/aeg/.groovy/grapes/ch.qos.logback/logback-classic/jars/logback-classic-0.9.28.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Users/aeg/.groovy/grapes/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.selector.DefaultContextSelector]
org.eiji.GroovyTest
01:29:22.028 [main] INFO org.eiji.GroovyTest - INFO
01:29:22.031 [main] DEBUG org.eiji.GroovyTest - DEBUG
01:29:22.032 [main] ERROR org.eiji.GroovyTest - ERROR
hello world