Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: UI
    • Labels:
      None
    • Global Rank:
      27462
    • Release Note:
      Yes

      Description

      We need to fix bundle logging, and make Jetty and Nexus use same logback backend of SLF4J.

      Nexus 2.0 line has following setup: jetty on it's classpath does not have any slf4j stuff, everything is in Nexus webapp. Hence, Jetty uses it's "std out" logger, and it's annoying for multiple reasons: it is not getting into nexus.log, it uses different formatting, is hard to configure (at least different stuff needed often misleding).

      Nexus 2.1 line is a bit better: jetty on it's classpath has slf4j+logback, but those classes are hidden (marked as server classes), and Nexus still has it's own copy of slf4j+logback. Hence, we have logback in jetty's own classloader but also in nexus classloader. Reason for this is the "nexus-logging-extras" module, that tampers directly with logback and contains a logback appender implementation.

      Because of appender, jetty cannot share at "server level" the logback, as then logbacks's classloader would not find appender that is configured and resides in nexus classloader (child of jetty classloader, the one loading up logback). Situation as in Nexus 2.0 is a no go either, jetty would not "see" logback.

      Hence, what we need is to split "nexus=logging-extras" module in two: one with components that would go along with nexus (where it is today), and one that can be extracted and put on "top level" (jetty level), unmark jetty's logback as "server classes" and have only one logback instance in bundle.

        Issue Links

          Activity

          Show
          Tamás Cservenák added a comment - https://github.com/sonatype/nexus/pull/530
          Hide
          Peter Lynch added a comment -

          Tried out the branch. I am not clear on what now gets added to nexus.log that was not there before.

          My nexus.log first line was

          jvm 1    | 2012-09-04 12:58:56 INFO  [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus
          

          However, stdout using nexus console printed all of this before that line. ( notice the triplicate of started o.e.j.w.WebAppContext )

          running ./bin/nexus console
          Running Nexus OSS...
          wrapper  | --> Wrapper Started as Console
          wrapper  | Launching a JVM...
          jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
          jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
          jvm 1    | 
          jvm 1    | 2012-09-04 12:58:53 INFO  [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Starting with arguments: [./conf/jetty.xml]
          jvm 1    | 2012-09-04 12:58:53 INFO  [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - JVM ID: 1, JVM PID: 48116, Wrapper PID: 48115, User: plynch
          jvm 1    | 2012-09-04 12:58:53 INFO  [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Current directory: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT
          jvm 1    | 2012-09-04 12:58:53 INFO  [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Temp directory: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/sonatype-work/nexus/tmp
          jvm 1    | 2012-09-04 12:58:53 INFO  [y-main-thread-1] - org.eclipse.jetty.server.Server - jetty-8.1.3.v20120416
          jvm 1    | 2012-09-04 12:58:53 INFO  [y-main-thread-1] - org.sonatype.sisu.jetty.custom.DisableTagLibsListener - Disabling TLD support for WebAppContext on context path: /nexus
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /nexus, did not find org.apache.jasper.servlet.JspServlet
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - /nexus - Configuring Nexus in bundle...
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - /nexus - Setting Plexus basedir context variable to (pre-set in System properties): /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT
          jvm 1    | 2012-09-04 12:58:54 INFO  [y-main-thread-1] - org.sonatype.appcontext.AppContext - 
          jvm 1    | Application context "nexus" dump:
          jvm 1    | Parent context is "jetty"
          jvm 1    | "nexus-work"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus" (raw: "${bundleBasedir}/../sonatype-work/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "runtime"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF" (raw: "${bundleBasedir}/nexus/WEB-INF", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "application-port"="8081" (raw: "8081", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "application-host"="0.0.0.0" (raw: "0.0.0.0", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "pr.encryptor.publicKeyPath"="/apr/public-key.txt" (raw: "/apr/public-key.txt", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "nexus-webapp"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus" (raw: "${bundleBasedir}/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | "application-conf"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties))
          jvm 1    | "nexus-app"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties))
          jvm 1    | "security-xml-file"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties))
          jvm 1    | "bundleBasedir"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT" (raw: "/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT", src: static("bundleBasedir"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT"))
          jvm 1    | "nexus-webapp-context-path"="/nexus" (raw: "/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties))
          jvm 1    | Total of 11 entries.
          jvm 1    | 
          jvm 1    | 2012-09-04 12:58:56 INFO  [y-main-thread-1] - org.sonatype.sisu.ehcache.CacheManagerComponentImpl - Configuring EHCache CacheManager from classpath.
          jvm 1    | 2012-09-04 12:58:56 WARN  [y-main-thread-1] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - No configuration file in place, copying the default one and continuing with it.
          jvm 1    | 2012-09-04 12:58:56 INFO  [y-main-thread-1] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - Loading Security configuration from /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf/security-configuration.xml
          jvm 1    | 2012-09-04 12:58:56 INFO  [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus
          jvm 1    | 2012-09-04 12:58:56 INFO  [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus
          
          

          So, what's new with this pull - and can we have tests to prove it works?

          Show
          Peter Lynch added a comment - Tried out the branch. I am not clear on what now gets added to nexus.log that was not there before. My nexus.log first line was jvm 1 | 2012-09-04 12:58:56 INFO [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus However, stdout using nexus console printed all of this before that line. ( notice the triplicate of started o.e.j.w.WebAppContext ) running ./bin/nexus console Running Nexus OSS... wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. jvm 1 | jvm 1 | 2012-09-04 12:58:53 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Starting with arguments: [./conf/jetty.xml] jvm 1 | 2012-09-04 12:58:53 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - JVM ID: 1, JVM PID: 48116, Wrapper PID: 48115, User: plynch jvm 1 | 2012-09-04 12:58:53 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Current directory: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT jvm 1 | 2012-09-04 12:58:53 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Temp directory: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/sonatype-work/nexus/tmp jvm 1 | 2012-09-04 12:58:53 INFO [y-main-thread-1] - org.eclipse.jetty.server.Server - jetty-8.1.3.v20120416 jvm 1 | 2012-09-04 12:58:53 INFO [y-main-thread-1] - org.sonatype.sisu.jetty.custom.DisableTagLibsListener - Disabling TLD support for WebAppContext on context path: /nexus jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /nexus, did not find org.apache.jasper.servlet.JspServlet jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - /nexus - Configuring Nexus in bundle... jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - /nexus - Setting Plexus basedir context variable to (pre-set in System properties): /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT jvm 1 | 2012-09-04 12:58:54 INFO [y-main-thread-1] - org.sonatype.appcontext.AppContext - jvm 1 | Application context "nexus" dump: jvm 1 | Parent context is "jetty" jvm 1 | "nexus-work"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus" (raw: "${bundleBasedir}/../sonatype-work/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "runtime"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF" (raw: "${bundleBasedir}/nexus/WEB-INF", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "application-port"="8081" (raw: "8081", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "application-host"="0.0.0.0" (raw: "0.0.0.0", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "pr.encryptor.publicKeyPath"="/apr/public-key.txt" (raw: "/apr/public-key.txt", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "nexus-webapp"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus" (raw: "${bundleBasedir}/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | "application-conf"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties)) jvm 1 | "nexus-app"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties)) jvm 1 | "security-xml-file"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/WEB-INF/plexus.properties)) jvm 1 | "bundleBasedir"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT" (raw: "/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT", src: static("bundleBasedir"="/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT")) jvm 1 | "nexus-webapp-context-path"="/nexus" (raw: "/nexus", src: propsFile(/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/conf/nexus.properties)) jvm 1 | Total of 11 entries. jvm 1 | jvm 1 | 2012-09-04 12:58:56 INFO [y-main-thread-1] - org.sonatype.sisu.ehcache.CacheManagerComponentImpl - Configuring EHCache CacheManager from classpath. jvm 1 | 2012-09-04 12:58:56 WARN [y-main-thread-1] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - No configuration file in place, copying the default one and continuing with it. jvm 1 | 2012-09-04 12:58:56 INFO [y-main-thread-1] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - Loading Security configuration from /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/../sonatype-work/nexus/conf/security-configuration.xml jvm 1 | 2012-09-04 12:58:56 INFO [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus jvm 1 | 2012-09-04 12:58:56 INFO [y-main-thread-1] - org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.w.WebAppContext{/nexus,file:/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus/},/Users/plynch/dev/sonatype/nexus-all/nexus-bundles/nexus-oss/target/nexus-2.2-SNAPSHOT-bundle/nexus-2.2-SNAPSHOT/nexus So, what's new with this pull - and can we have tests to prove it works?
          Hide
          Tamás Cservenák added a comment -

          Wrt dupe loglines with ContextHandler: this is Jetty's "feature": The logging you see happens in ContextHandler.callContextInitialized(ServletContextListener l, ServletContextEvent e) from a for loop, and that for loop iterates over context listeners. We in Nexus have 4 listeners declared in web.xml (also, unsure is Jetty using this feature to implement some of their internal stuff or not).

          Also, by downloading the 8.1.5 distro and just booting it up, I see 5 same lines for the distro-preinstalled "test.war".....

          Wrt what it gives us: If you read issue description, it clearly states what the goal is: to have single copy of logback in bundle, and have both Jetty and Nexus use that same copy (and instance at runtime) to avoid problems as reported by users, that someone added a jetty handler (I believe it was for some redirect handler), and it turned out that changing logback.xml was simply not picked up by Jetty.

          2.2 with this change would have only one copy of logback (in contrary to the 2.1's duplicated ones) and jetty.xml becomes simpler too, as logback and sl4j classes are no more declared "server classes", and hence, hidden from webapps running within Jetty. Logback is simply "shared" from top level of classloader hierarchy, as it should be.

          Show
          Tamás Cservenák added a comment - Wrt dupe loglines with ContextHandler: this is Jetty's "feature": The logging you see happens in ContextHandler.callContextInitialized(ServletContextListener l, ServletContextEvent e) from a for loop, and that for loop iterates over context listeners. We in Nexus have 4 listeners declared in web.xml (also, unsure is Jetty using this feature to implement some of their internal stuff or not). Also, by downloading the 8.1.5 distro and just booting it up, I see 5 same lines for the distro-preinstalled "test.war"..... Wrt what it gives us: If you read issue description, it clearly states what the goal is: to have single copy of logback in bundle, and have both Jetty and Nexus use that same copy (and instance at runtime) to avoid problems as reported by users, that someone added a jetty handler (I believe it was for some redirect handler), and it turned out that changing logback.xml was simply not picked up by Jetty. 2.2 with this change would have only one copy of logback (in contrary to the 2.1's duplicated ones) and jetty.xml becomes simpler too, as logback and sl4j classes are no more declared "server classes", and hence, hidden from webapps running within Jetty. Logback is simply "shared" from top level of classloader hierarchy, as it should be.

            People

            • Assignee:
              Unassigned
              Reporter:
              Tamás Cservenák
              Last Updated By:
              Jason Dillon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: