[logback-user] logback.groovy configuration throws errors

Tompi Mat thauer.spam at gmail.com
Wed Nov 9 21:09:37 CET 2011


Hi,

In the examples I have shown so far, nothing has been on my classpath
except for the directory containing logback.groovy.  I.e. slf4j-api was
@Grab-bed in HelloWorld.groovy.

Removing all the @Grabs from both HelloWorld.groovy and logback.groovy
and placing all the jars on the classpath indeed works.

Of course this is not a path I want to go, while I would love to use
logback.groovy instead of logback.xml, the latter beats having jars
around instead of @Grabs

While this is a serious problem for me I am surprised that noone else is
running into this?

Thanks a lot for the discussion, I am looking forward to news that this
may some day be fixed.

Cheers, I really appreciate your work

Tamas

On 11/09/2011 07:51 PM, ceki wrote:
>
> Have you tried placing logback-core.jar and logback-classic.jar on
> your class path in the same way that slf4j-api.jar is.
>
> On 09.11.2011 19:42, Tompi Mat wrote:
>> After removing the @Grabs:
>>
>> $ groovy HelloWorld.groovy
>> Failed to instantiate [ch.qos.logback.classic.LoggerContext]
>> Reported exception:
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
>> failed:
>> Script1.groovy: 1: unable to resolve class
>> ch.qos.logback.classic.encoder.PatternLayoutEncoder
>>   @ line 1, column 1.
>>     import ch.qos.logback.classic.encoder.PatternLayoutEncoder
>>     ^
>>
>> Script1.groovy: 2: unable to resolve class
>> ch.qos.logback.core.ConsoleAppender
>>   @ line 2, column 1.
>>     import ch.qos.logback.core.ConsoleAppender
>>     ^
>>
>> Script1.groovy: 4: unable to resolve class ch.qos.logback.classic.Level
>>   @ line 4, column 1.
>>     import static ch.qos.logback.classic.Level.DEBUG
>>     ^
>
>



More information about the Logback-user mailing list