Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-1095

Logging level is not interpreted properly for containers that output their messages on stderr

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.2.0
    • Fix versions: 1.2.2
    • Components: Core
    • Labels:
      None

      Description

      I'm running the Maven 2 Plugin with the following configuration in order to run integration tests:

      <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <version>1.2.0</version>
      <configuration>
      <container>
      <containerId>jetty8x</containerId>
      <artifactInstaller>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-distribution</artifactId>
      <version>8.1.2.v20120308</version>
      </artifactInstaller>
      </container>
      <configuration>
      <deployables>
      <deployable>
      <groupId>my.group</groupId>
      <artifactId>webapp-with-jdk14</artifactId>
      <type>war</type>
      </deployable>
      </deployables>
      </configuration>
      </configuration>
      </plugin>
      

      When I do a mvn cargo:run or similar I get the following very noisy output on the console:

      [INFO] --- cargo-maven2-plugin:1.2.0:run (default-cli) @ tests ---
      [INFO] [en2.ContainerRunMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-jetty:jar:1.2.0 for container jetty8x
      [INFO] [stalledLocalDeployer] Deploying WAR by creating Jetty context XML file in [C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/contexts/webapp-with-jdk14.xml]...
      [INFO] [talledLocalContainer] Jetty 8.x starting...
      [INFO] [talledLocalContainer] Running Jetty As: "C:\Program Files\Java\jdk1.6.0_30\jre\bin\java.exe" -Xms128m -Xmx512m -XX:PermSize=48m -XX:MaxPermSize=128m -Djetty.home=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\installs\jetty-distribution-8.1.2.v20120308\jetty-distribution-8.1.2.v20120308 -DSTOP.PORT=8079 -DSTOP.KEY=secret -Djetty.port=8090 -Dconfig.home=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x -Djetty.logs=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/logs -classpath "C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\sysout-over-slf4j-system\2.0.0-SNAPSHOT\sysout-over-slf4j-system-2.0.0-SNAPSHOT.jar;C:\Program Files\Java\jdk1.6.0_30\lib\tools.jar" -jar C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\installs\jetty-distribution-8.1.2.v20120308\jetty-distribution-8.1.2.v20120308\start.jar OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations --ini --pre C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-logging.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-annotations.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-deploy.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-webapps.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-contexts.xml C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/etc/jetty-testrealm.xml "path=C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\sysout-over-slf4j-system\2.0.0-SNAPSHOT\sysout-over-slf4j-system-2.0.0-SNAPSHOT.jar;C:\Program Files\Java\jdk1.6.0_30\lib\tools.jar"
      [WARNING] [talledLocalContainer] WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:31.632:INFO::Redirecting stderr/stdout to C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\logs\2012_03_14.stderrout.log
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:31.776:INFO:oejs.Server:jetty-8.1.2.v20120308
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:31.798:INFO:oejdp.ScanningAppProvider:Deployment monitor C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps at interval 1
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:31.809:INFO:oejd.DeploymentManager:Deployable added: C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:31.854:INFO:oejw.WebInfConfiguration:Extract jar:file:/C:/Users/Rob.Elliot/Workspaces/Lidalia/sysout-over-slf4j/functional-tests/tests/target/cargo/configurations/jetty8x/webapps/cargocpc.war!/ to C:\cygwin\tmp\jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-\webapp
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.541:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/cargocpc,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-/webapp/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.541:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/cargocpc,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-/webapp/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.541:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/cargocpc,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-/webapp/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.577:INFO:oejdp.ScanningAppProvider:Deployment monitor C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\contexts at interval 1
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.583:INFO:oejd.DeploymentManager:Deployable added: C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\contexts\webapp-with-jdk14.xml
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:32.608:INFO:oejw.WebInfConfiguration:Extract jar:file:/C:/Users/Rob.Elliot/.m2/repository/uk/org/lidalia/sysout-over-slf4j/webapp-with-jdk14/2.0.0-SNAPSHOT/webapp-with-jdk14-2.0.0-SNAPSHOT.war!/ to C:\cygwin\tmp\jetty-0.0.0.0-8090-webapp-with-jdk14-2.0.0-SNAPSHOT.war-_webapp-with-jdk14-any-\webapp
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:33.598:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-webapp-with-jdk14-2.0.0-SNAPSHOT.war-_webapp-with-jdk14-any-/webapp/},C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\webapp-with-jdk14\2.0.0-SNAPSHOT\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:33.598:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-webapp-with-jdk14-2.0.0-SNAPSHOT.war-_webapp-with-jdk14-any-/webapp/},C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\webapp-with-jdk14\2.0.0-SNAPSHOT\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:33.598:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-webapp-with-jdk14-2.0.0-SNAPSHOT.war-_webapp-with-jdk14-any-/webapp/},C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\webapp-with-jdk14\2.0.0-SNAPSHOT\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:33.628:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-webapp-with-jdk14-2.0.0-SNAPSHOT.war-_webapp-with-jdk14-any-/webapp/},C:\Users\Rob.Elliot\.m2\repository\uk\org\lidalia\sysout-over-slf4j\webapp-with-jdk14\2.0.0-SNAPSHOT\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:38:33.671:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8090
      [INFO] [talledLocalContainer] Jetty 8.x started on port [8090]
      ...
      [INFO] --- cargo-maven2-plugin:1.2.0:stop (stop-container) @ tests ---
      [INFO] [talledLocalContainer] Jetty 8.x is stopping...
      [INFO] [talledLocalContainer] Running Jetty As: "C:\Program Files\Java\jdk1.6.0_30\jre\bin\java.exe" -Djetty.home=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functionaltests\tests\target\cargo\installs\jetty-distribution-8.1.2.v20120308\jetty-distribution-8.1.2.v20120308 -DSTOP.PORT=8079 -DSTOP.KEY=secret -Djetty.port=8090 -Dconfig.home=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x -Djetty.logs=C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x/logs -classpath "C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\sysout-over-slf4j-system\target\sysout-over-slf4j-system-2.0.0-SNAPSHOT.jar;C:\Program Files\Java\jdk1.6.0_30\lib\tools.jar" -jar C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\installs\jetty-distribution-8.1.2.v20120308\jetty-distribution-8.1.2.v20120308\start.jar --stop
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:57.901:INFO:oejs.Server:Graceful shutdown SelectChannelConnector@0.0.0.0:8090
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:57.901:INFO:oejs.Server:Graceful shutdown o.e.j.w.WebAppContext{/cargocpc,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-/webapp/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:57.902:INFO:oejs.Server:Graceful shutdown o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/Users/Rob.Elliot/Workspaces/Lidalia/sysout-over-slf4j/functional-tests/sysout-over-slf4j-webapps/webapp-with-jdk14/target/webapp-with-jdk14-2.0.0-SNAPSHOT/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\sysout-over-slf4j-webapps\webapp-with-jdk14\target\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:58.934:INFO:oejsl.ELContextCleaner:javax.el.BeanELResolver purged
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:58.934:INFO:oejsh.ContextHandler:stopped o.e.j.w.WebAppContext{/webapp-with-jdk14,file:/C:/Users/Rob.Elliot/Workspaces/Lidalia/sysout-over-slf4j/functional-tests/sysout-over-slf4j-webapps/webapp-with-jdk14/target/webapp-with-jdk14-2.0.0-SNAPSHOT/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\sysout-over-slf4j-webapps\webapp-with-jdk14\target\webapp-with-jdk14-2.0.0-SNAPSHOT.war
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:58.937:INFO:oejsl.ELContextCleaner:javax.el.BeanELResolver purged
      [WARNING] [talledLocalContainer] 2012-03-14 10:55:58.937:INFO:oejsh.ContextHandler:stopped o.e.j.w.WebAppContext{/cargocpc,file:/C:/cygwin/tmp/jetty-0.0.0.0-8090-cargocpc.war-_cargocpc-any-/webapp/},C:\Users\Rob.Elliot\Workspaces\Lidalia\sysout-over-slf4j\functional-tests\tests\target\cargo\configurations\jetty8x\webapps\cargocpc.war
      [INFO] [talledLocalContainer] Jetty 8.x is stopped
      

      As you can see I get a stream of WARNING messages that should actually be INFO messages, three identical "ContextHandler:started" messages for cargocpc.war and then four identical "ContextHandler:started" messages for webapp-with-jdk14-2.0.0-SNAPSHOT.war (my webapp) and an apparently genuine "WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec" which means nothing to me and does not seem to be anything I can either fix or suppress.

      I'm a big believer in the importance of keeping logging light and accurate, so repetitive and inaccurate logging like this is something I'd like to know how to fix.

        Attachments

          Activity

            People

            • Assignee:
              savasalitokmen Savas Ali Tokmen (Inactive)
              Reporter:
              robelliot Rob Elliot (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: