[logback-user] What support is needed to run with logback.groovy configuration?
Steve Cohen
scohen at javactivity.org
Tue Jul 31 14:24:37 CEST 2012
Maybe this got lost over the weekend? What does this exception thrown
when trying to use a logback.groovy configuration indicate?
Groovy.1.7.2 is on the classpath as indicated by ceki.
On 07/29/2012 10:25 AM, Steve Cohen wrote:
>
> Sorry. My previous positive reply about your suggestion was erroneous. I
> had neglected to tell my app to use the groovy configuration file. When
> I did that, I got the same error as I did using the earlier version of
> groovy:
>
> 10:18:14,490 |-INFO in
> ch.qos.logback.classic.gaffer.ConfigurationDelegate at 1f0aecc - Adding
> aforementioned turbo filter to context
> Failed to instantiate [ch.qos.logback.classic.LoggerContext]
> Reported exception:
> groovy.lang.MissingPropertyException: No such property: files for class:
> Script1
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)
>
> at
> org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
>
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:241)
>
> at Script1.run(Script1.groovy:39)
> at Script1$run.call(Unknown Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
>
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
>
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
>
> at
> ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:59)
>
> at
> ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown
> Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
>
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
>
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
>
> at
> ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:37)
>
> at
> ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43)
>
> at
> ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:65)
>
> at
> ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
>
> at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
> at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
> at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265)
> ...
>
> On 07/28/2012 12:20 PM, Steve Cohen wrote:
>> No, I hadn't, thanks! That works.
>> I made groovy a runtime dependency and it works.
>>
>> My repo mirror only showed me groovy up to 1.6.3, but when I changed it
>> to 1.7.2, it found it and it works.
>>
>>
>>
>>
>>
>> On 07/27/2012 05:09 PM, ceki wrote:
>>>
>>> Hi Steve,
>>>
>>> Have you tried adding the following?
>>>
>>> <dependency>
>>> <groupId>org.codehaus.groovy</groupId>
>>> <artifactId>groovy-all</artifactId>
>>> <version>1.7.2</version>
>>> </dependency>
>>>
>>> It's the groovy dependency that logback-classic uses.
>>>
>>> HTH,
>>>
>>> On 27.07.2012 17:54, Steve Cohen wrote:
>>>> I switched my application from using logback.xml to using
>>>> logback.groovy. I just wanted to try it but off the bat, I much prefer
>>>> scanning through an easily alphabetized list of loggers in the groovy
>>>> file to the mess that you get with XML and lots of loggers.
>>>>
>>>> However, my hopes for a quick success were dashed when I saw:
>>>>
>>>> Groovy classes are not available on the class path. ABORTING
>>>> INITIALIZION.
>>>>
>>>> What must I do to my application classpath to allow logback
>>>> configuration via groovy? The manual does not seem to have any
>>>> information on this.
>>>>
>>>> Also, I noticed via goggling the issue that JSON causes an issue with
>>>> groovy. This will also impact me as our application makes use of JSON.
>>>>
>>>> Thanks to anyone who can provide this information.
>>>>
>>>> Steve Cohen
>>>
>>>
>>
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/logback-user
>>
>>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
>
More information about the Logback-user
mailing list