[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_0.9.30-58-ga92ebc4

Gitbot git-noreply at pixie.qos.ch
Fri Oct 28 15:33:44 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  a92ebc4fb60906beaa77d4c673159b430b752e88 (commit)
      from  ef24930c341565098856495fda5deb942fa975de (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=a92ebc4fb60906beaa77d4c673159b430b752e88
http://github.com/ceki/logback/commit/a92ebc4fb60906beaa77d4c673159b430b752e88

commit a92ebc4fb60906beaa77d4c673159b430b752e88
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Fri Oct 28 15:33:11 2011 +0200

    make tests pass, doc uptates, upgrade to Groovy 1.8.3

diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 7a34642..f672bac 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -226,24 +226,34 @@
         <configuration>
           <source>1.5</source>
           <target>1.5</target>
+                <compilerId>groovy-eclipse-compiler</compilerId>
+      <verbose>true</verbose>
         </configuration>
-      </plugin>
 
-      <plugin>
-        <groupId>org.codehaus.groovy.maven</groupId>
-        <artifactId>gmaven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>generateStubs</goal>
-              <goal>compile</goal>
-              <goal>generateTestStubs</goal>
-              <goal>testCompile</goal>
-            </goals>
-          </execution>
-        </executions>
+            <dependencies>
+      <dependency>
+        <groupId>org.codehaus.groovy</groupId>
+        <artifactId>groovy-eclipse-compiler</artifactId>
+        <version>2.5.2-01</version>
+      </dependency>
+    </dependencies>
       </plugin>
 
+      <!--<plugin>-->
+        <!--<groupId>org.codehaus.groovy.maven</groupId>-->
+        <!--<artifactId>gmaven-plugin</artifactId>-->
+        <!--<executions>-->
+          <!--<execution>-->
+            <!--<goals>-->
+              <!--<goal>generateStubs</goal>-->
+              <!--<goal>compile</goal>-->
+              <!--<goal>generateTestStubs</goal>-->
+              <!--<goal>testCompile</goal>-->
+            <!--</goals>-->
+          <!--</execution>-->
+        <!--</executions>-->
+      <!--</plugin>-->
+
       <plugin>
          <groupId>org.scala-tools</groupId>
          <artifactId>maven-scala-plugin</artifactId>
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilderTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilderTest.java
index 30f6e74..be57653 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilderTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilderTest.java
@@ -44,6 +44,7 @@ public class PropertyEvalScriptBuilderTest {
   String containsScript = "p(\"" + k + "\").contains(\"" + v + "\")";
 
   String isNullScriptStr = "isNull(\"" + k + "\")";
+  String isDefiedScriptStr = "isDefined(\"" + k + "\")";
 
   @Before
   public void setUp() {
@@ -113,18 +114,15 @@ public class PropertyEvalScriptBuilderTest {
     buildAndAssertTrue(isNullScriptStr);
   }
 
-  @Test
-  public void nameOK() throws Exception {
-    Condition condition = pesb.build("name.contains(\"" + context.getName() + "\")");
-    assertNotNull(condition);
-    assertTrue(condition.evaluate());
+  public void isDefinedForIExistimgtPropertyShouldEvaluateToTrue() throws Exception {
+    localPropContainer.addSubstitutionProperty(k, v);
+    buildAndAssertTrue(isDefiedScriptStr);
   }
 
   @Test
-  public void wrongName() throws Exception {
-    Condition condition = pesb.build("name.contains(\"x\")");
-    assertNotNull(condition);
-    assertFalse(condition.evaluate());
+  public void isDefinedForInexistentPropertyShouldEvaluateToTrue() throws Exception {
+    buildAndAssertFalse(isDefiedScriptStr);
   }
 
+
 }
diff --git a/logback-site/src/site/pages/manual/configuration.html b/logback-site/src/site/pages/manual/configuration.html
index 249ec27..c14f95d 100644
--- a/logback-site/src/site/pages/manual/configuration.html
+++ b/logback-site/src/site/pages/manual/configuration.html
@@ -1612,24 +1612,22 @@ fileName=myApp.log
     </else>    
   </if></pre>  
 
-  <p>The condition is a Java expression in which only context properties
-  or system properties are accessible. For a key passed as argument,
-  the <code>property</code>() or its shorter equivalent
+  <p>The condition is a Java expression in which only context
+  properties or system properties are accessible. For a key passed as
+  argument, the <code>property</code>() or its shorter equivalent
   <code>p</code>() methods return the String value of the property.
-  For example, to access the value of a property with key "k", you would
-  write <code>property("k")</code> or equivalently
+  For example, to access the value of a property with key "k", you
+  would write <code>property("k")</code> or equivalently
   <code>p("k")</code>. If the property with key "k" is undefined, the
   property method will return the empty string and not null. This
-  avoids the need to check for null values. If you need to check
-  whether a property is null, the <code>isNull()</code> method is
-  provided. For example, you can write <code>isNull("k")</code>.</p>
-
-  <p>In the next example, the <code>ConsoleAppender</code> will be
-  attached to the root logger, but only if the HOSTNAME is
-  "torino". Note that the <code>FileAppender</code> named "FILE" is
-  attached to the root logger in any case.
-  </p>
+  avoids the need to check for null values.</p>
 
+  <p>The <code>isDefined()</code> method can be used to check whether
+  a property is defined. For example, to check whether the property
+  "k" is defined you would write <code>isDefined("k")</code>
+  Similarly, if you need to check whether a property is null, the
+  <code>isNull()</code> method is provided. Example:
+  <code>isNull("k")</code>.</p>
 
   <pre class="prettyprint source"><configuration>
 
diff --git a/pom.xml b/pom.xml
index 5a0c1d0..52cf6f7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
     <junit.version>4.8.2</junit.version>
     <janino.version>2.5.10</janino.version>
     <scala.version>2.9.1</scala.version>
-    <groovy.version>1.7.6</groovy.version>
+    <groovy.version>1.8.3</groovy.version>
     <consolePlugin.version>1.1.0</consolePlugin.version>
     <tomcat.version>7.0.21</tomcat.version>
     <jetty.version>7.5.1.v20110908</jetty.version>

-----------------------------------------------------------------------

Summary of changes:
 logback-classic/pom.xml                            |   38 ++++++++++++-------
 .../conditional/PropertyEvalScriptBuilderTest.java |   16 ++++-----
 .../src/site/pages/manual/configuration.html       |   26 ++++++-------
 pom.xml                                            |    2 +-
 4 files changed, 44 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list