<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I don't know much about classloading but is not logback.xml loaded
    by logback.jar as well?<br>
    <br>
    (@Grab puts the jars on the classpath, too - I am completely happy
    with @Grab-bing logback dependencies from HelloWorld.groovy, see the
    original post)<br>
    <br>
    Tamas<br>
    <br>
    <br>
    On 11/09/2011 09:13 PM, Chris Pratt wrote:
    <blockquote
cite="mid:CAALdY0xvmrOY9uPm-oLZPiPgFp1_kRv+oOQRKBxc6U5HU78+6Q@mail.gmail.com"
      type="cite">Being that the code that loads logback.groovy is
      within logback.jar, I don't see any way around having at least
      that jar on the classpath.
      <div>  (*Chris*)<br>
        <br>
        <div class="gmail_quote">On Wed, Nov 9, 2011 at 12:09 PM, Tompi
          Mat <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:thauer.spam@gmail.com">thauer.spam@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
            <br>
            In the examples I have shown so far, nothing has been on my
            classpath<br>
            except for the directory containing logback.groovy.  I.e.
            slf4j-api was<br>
            @Grab-bed in HelloWorld.groovy.<br>
            <br>
            Removing all the @Grabs from both HelloWorld.groovy and
            logback.groovy<br>
            and placing all the jars on the classpath indeed works.<br>
            <br>
            Of course this is not a path I want to go, while I would
            love to use<br>
            logback.groovy instead of logback.xml, the latter beats
            having jars<br>
            around instead of @Grabs<br>
            <br>
            While this is a serious problem for me I am surprised that
            noone else is<br>
            running into this?<br>
            <br>
            Thanks a lot for the discussion, I am looking forward to
            news that this<br>
            may some day be fixed.<br>
            <br>
            Cheers, I really appreciate your work<br>
            <br>
            Tamas<br>
            <div class="im HOEnZb"><br>
              On 11/09/2011 07:51 PM, ceki wrote:<br>
              ><br>
              > Have you tried placing logback-core.jar and
              logback-classic.jar on<br>
              > your class path in the same way that slf4j-api.jar
              is.<br>
              ><br>
              > On 09.11.2011 19:42, Tompi Mat wrote:<br>
              >> After removing the @Grabs:<br>
              >><br>
              >> $ groovy HelloWorld.groovy<br>
              >> Failed to instantiate
              [ch.qos.logback.classic.LoggerContext]<br>
              >> Reported exception:<br>
              >>
              org.codehaus.groovy.control.MultipleCompilationErrorsException:
              startup<br>
              >> failed:<br>
              >> Script1.groovy: 1: unable to resolve class<br>
              >>
              ch.qos.logback.classic.encoder.PatternLayoutEncoder<br>
              >>   @ line 1, column 1.<br>
              >>     import
              ch.qos.logback.classic.encoder.PatternLayoutEncoder<br>
              >>     ^<br>
              >><br>
              >> Script1.groovy: 2: unable to resolve class<br>
              >> ch.qos.logback.core.ConsoleAppender<br>
              >>   @ line 2, column 1.<br>
              >>     import ch.qos.logback.core.ConsoleAppender<br>
              >>     ^<br>
              >><br>
              >> Script1.groovy: 4: unable to resolve class
              ch.qos.logback.classic.Level<br>
              >>   @ line 4, column 1.<br>
              >>     import static
              ch.qos.logback.classic.Level.DEBUG<br>
              >>     ^<br>
              ><br>
              ><br>
              <br>
            </div>
            <div class="HOEnZb">
              <div class="h5">_______________________________________________<br>
                Logback-user mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
                <a moz-do-not-send="true"
                  href="http://mailman.qos.ch/mailman/listinfo/logback-user"
                  target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Logback-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a>
<a class="moz-txt-link-freetext" href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>