Hi!<br><br>This groovy-file ...:<br><br><span style="font-family: courier new,monospace;">import ch.qos.logback.classic.PatternLayout</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">import ch.qos.logback.core.ConsoleAppender</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">import ch.qos.logback.core.encoder.LayoutWrappingEncoder</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">appender("STDOUT", ConsoleAppender) {</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;"> encoder(LayoutWrappingEncoder) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   layout(PatternLayout) {</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">     pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{55}.%M.%L - %msg%n"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   }</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;"><br>root(ALL, ["STDOUT"])<br>

<br>... apparently crashes the configuration as such:<br><br>Failed to instantiate [ch.qos.logback.classic.LoggerContext]<br>Reported exception:<br>groovy.lang.MissingPropertyException: No such property: ALL for class: Script1<br>

    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)<br>    at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)<br>    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)<br>

    at Script1.run(Script1.groovy:13)<br>    at Script1$run.call(Unknown Source)<br>    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)<br>    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)<br>

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)<br>    at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:59)<br>    at ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source)<br>

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)<br>    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)<br>    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)<br>

    at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:37)<br>    at ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:44)<br>    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67)<br>

    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)<br>    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)<br>    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)<br>

    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)<br>    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)<br>    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279)<br>    at XYZ.doLogConfig(XYZ.java:40)<br>

    at XYZ.main(XYZ:169)<br><br><br><i><br>The problem is obviously the not-defined property "ALL". The problem I am reporting is that this isn't caught.</i><br><br><br>The console-dump happens in the <i>"We should never get here"</i> catch block below:<br>

<br><span style="font-family: courier new,monospace;">  void init() {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    try {</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      try {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        new ContextInitializer(defaultLoggerContext).autoConfig();</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      } catch (JoranException je) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        Util.report("Failed to auto configure default logger context", je);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      StatusPrinter.printInCaseOfErrorsOrWarnings(defaultLoggerContext);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">      contextSelectorBinder.init(defaultLoggerContext, KEY);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      initialized = true;</span><br style="font-family: courier new,monospace;">

<span style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">    } catch (Throwable t) {</span><br style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">

<span style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">      // we should never get here</span><br style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">

<span style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">      Util.report("Failed to instantiate [" + LoggerContext.class.getName()</span><br style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">

<span style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">          + "]", t);</span><br style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">

<span style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">    }</span><br style="background-color: rgb(255, 204, 204); color: rgb(0, 0, 153); font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">  }</span><br style="font-family: courier new,monospace;"><br><br>Notice that the StatusManager does not know that the config failed:<br><br>13:32:07,643 |-INFO in ch.qos.logback.classic.LoggerContext[Emma logcontext] - Found resource [logback.groovy] at [file:/XYZ/target/classes/logback.groovy]<br>

13:32:08,807 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@2111e072 - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]<br>13:32:08,809 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@2111e072 - Naming appender as [STDOUT]<br>

<br>Kind regards,<br>Endre Stølsvik.<br>