Permalink
Browse files

Add logback.xml to maven plugin close #760

  • Loading branch information...
Stephane Landelle
Stephane Landelle committed Oct 8, 2012
1 parent 22e9205 commit 9b481483f8bbebd703c660f149add96167564887
Showing with 42 additions and 2 deletions.
  1. +9 −2 gatling-maven-plugin/pom.xml
  2. +33 −0 gatling-maven-plugin/src/main/resources/logback.xml
@@ -75,8 +75,15 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.mycila.maven-license-plugin</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>src/main/resources/*</include>
+ </includes>
+ </configuration>
+ </plugin>
</plugins>
</build>
-
-
</project>
@@ -0,0 +1,33 @@
+<!--
+
+ Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread{10}][%-5level][%file:%line] %logger{15} - %msg%n%rEx</pattern>
+ <immediateFlush>false</immediateFlush>
+ </encoder>
+ </appender>
+
+ <root>
+ <level value="WARN" />
+ <appender-ref ref="CONSOLE" />
+ </root>
+
+</configuration>

8 comments on commit 9b48148

@nremond

This comment has been minimized.

Show comment Hide comment
@nremond

nremond Oct 23, 2012

Member

How can we override it now ?

[INFO] 09:24:20,880 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
[INFO] 09:24:20,880 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/nre/developments/secutix/secutix2-js/app/tnjs-load-testing/src/main/resources/logback.xml]
[INFO] 09:24:20,881 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/home/nre/.m2/repository/com/excilys/ebi/gatling/gatling-maven-plugin/1.3.4/gatling-maven-plugin-1.3.4.jar!/logback.xml]
Member

nremond replied Oct 23, 2012

How can we override it now ?

[INFO] 09:24:20,880 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
[INFO] 09:24:20,880 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/nre/developments/secutix/secutix2-js/app/tnjs-load-testing/src/main/resources/logback.xml]
[INFO] 09:24:20,881 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/home/nre/.m2/repository/com/excilys/ebi/gatling/gatling-maven-plugin/1.3.4/gatling-maven-plugin-1.3.4.jar!/logback.xml]
@slandelle

This comment has been minimized.

Show comment Hide comment
@slandelle

slandelle Oct 23, 2012

Owner

Except having one that happens before in the classpath, I don't think you currently can.
Do you do that?
What do you propose?

Owner

slandelle replied Oct 23, 2012

Except having one that happens before in the classpath, I don't think you currently can.
Do you do that?
What do you propose?

@nremond

This comment has been minimized.

Show comment Hide comment
@nremond

nremond Oct 23, 2012

Member

I wanted to override it for adding this line :
<logger name="com.excilys.ebi.gatling.http.ahc.GatlingAsyncHandler" level="DEBUG" />

Member

nremond replied Oct 23, 2012

I wanted to override it for adding this line :
<logger name="com.excilys.ebi.gatling.http.ahc.GatlingAsyncHandler" level="DEBUG" />

@slandelle

This comment has been minimized.

Show comment Hide comment
@slandelle

slandelle Oct 23, 2012

Owner

Is launching from maven really suitable for debugging?

Owner

slandelle replied Oct 23, 2012

Is launching from maven really suitable for debugging?

@nremond

This comment has been minimized.

Show comment Hide comment
@nremond

nremond Oct 23, 2012

Member

Well, I don't feel like saying to everyone : "Everytime you want to debug things, copy-paste all the source code and download a zip of Gatling"

Member

nremond replied Oct 23, 2012

Well, I don't feel like saying to everyone : "Everytime you want to debug things, copy-paste all the source code and download a zip of Gatling"

@slandelle

This comment has been minimized.

Show comment Hide comment
@slandelle

slandelle Oct 23, 2012

Owner

Here are the easiest solutions I can think of:

  • add a logback-test.xml file to your project resources, it will have precedence over the embedded logback.xml
  • pass a -Dlogback.configurationFile=/path/to/config.xml argument

WDYT?

Owner

slandelle replied Oct 23, 2012

Here are the easiest solutions I can think of:

  • add a logback-test.xml file to your project resources, it will have precedence over the embedded logback.xml
  • pass a -Dlogback.configurationFile=/path/to/config.xml argument

WDYT?

@nremond

This comment has been minimized.

Show comment Hide comment
@nremond

nremond Oct 23, 2012

Member

Yeah, actually that's fine :)

Member

nremond replied Oct 23, 2012

Yeah, actually that's fine :)

@slandelle

This comment has been minimized.

Show comment Hide comment
@slandelle

slandelle Oct 23, 2012

Owner

Cool, because I had other/more complex solutions in my sleeve, but was quite reluctant going this way... ;)

Owner

slandelle replied Oct 23, 2012

Cool, because I had other/more complex solutions in my sleeve, but was quite reluctant going this way... ;)

Please sign in to comment.