You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2016/01/09 15:23:29 UTC

maven git commit: Add own static binder, as maven can tune it as it changes slf4j dep

Repository: maven
Updated Branches:
  refs/heads/slf4j-gossip 3f9df1ed0 -> b9e9d329e


Add own static binder, as maven can tune it as it changes slf4j dep

(like 1.6 changes)


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/b9e9d329
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/b9e9d329
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/b9e9d329

Branch: refs/heads/slf4j-gossip
Commit: b9e9d329efe11b869259fcafd56853afc96e905d
Parents: 3f9df1e
Author: Tamas Cservenak <ta...@cservenak.net>
Authored: Sat Jan 9 15:22:58 2016 +0100
Committer: Tamas Cservenak <ta...@cservenak.net>
Committed: Sat Jan 9 15:22:58 2016 +0100

----------------------------------------------------------------------
 apache-maven/pom.xml                            |  2 +-
 .../org.sonatype.gossip/config.properties       |  2 +-
 maven-embedder/pom.xml                          |  2 +-
 .../java/org/slf4j/impl/StaticLoggerBinder.java | 67 ++++++++++++++++++++
 .../java/org/slf4j/impl/StaticMDCBinder.java    | 46 ++++++++++++++
 .../java/org/slf4j/impl/StaticMarkerBinder.java | 45 +++++++++++++
 pom.xml                                         |  2 +-
 7 files changed, 162 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/apache-maven/pom.xml
----------------------------------------------------------------------
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 17b952e..ed4b3cf 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -89,7 +89,7 @@
     </dependency>
     <dependency>
       <groupId>org.sonatype.gossip</groupId>
-      <artifactId>gossip-slf4j</artifactId>
+      <artifactId>gossip-core</artifactId>
     </dependency>
     <dependency>
       <groupId>org.sonatype.gossip</groupId>

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/apache-maven/src/conf/logging/META-INF/org.sonatype.gossip/config.properties
----------------------------------------------------------------------
diff --git a/apache-maven/src/conf/logging/META-INF/org.sonatype.gossip/config.properties b/apache-maven/src/conf/logging/META-INF/org.sonatype.gossip/config.properties
index 48ef947..22d9028 100644
--- a/apache-maven/src/conf/logging/META-INF/org.sonatype.gossip/config.properties
+++ b/apache-maven/src/conf/logging/META-INF/org.sonatype.gossip/config.properties
@@ -26,4 +26,4 @@ profile.maven.listener.console.renderer=org.apache.maven.cli.logging.impl.MavenR
 profile.maven.listener.console.renderer.pattern=%m%n%x
 profile.maven.listener.console.renderer.colorize=true
 
-profile.maven.logger.root=INFO
+profile.maven.logger.ROOT=INFO

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index b41f4df..6b942c2 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -76,7 +76,7 @@
     </dependency>
     <dependency>
       <groupId>org.sonatype.gossip</groupId>
-      <artifactId>gossip-slf4j</artifactId>
+      <artifactId>gossip-core</artifactId>
       <optional>true</optional>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/maven-embedder/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/slf4j/impl/StaticLoggerBinder.java b/maven-embedder/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
new file mode 100644
index 0000000..3422223
--- /dev/null
+++ b/maven-embedder/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
@@ -0,0 +1,67 @@
+package org.slf4j.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.sonatype.gossip.Gossip;
+import org.sonatype.gossip.Log;
+
+import org.slf4j.ILoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.spi.LoggerFactoryBinder;
+
+/**
+ * Maven Gossip boostrap.
+ *
+ * @author Tamas Cservenak
+ * @since 3.3.9
+ */
+public final class StaticLoggerBinder
+    implements LoggerFactoryBinder
+{
+    private static final org.slf4j.impl.StaticLoggerBinder SINGLETON = new org.slf4j.impl.StaticLoggerBinder();
+
+    /**
+     * @since 1.1
+     * @return {@link #SINGLETON}
+     */
+    public static org.slf4j.impl.StaticLoggerBinder getSingleton()
+    {
+        return SINGLETON;
+    }
+
+    private final ILoggerFactory factory = new ILoggerFactory()
+    {
+        @Override
+        public Logger getLogger( final String name )
+        {
+            return Log.getLogger( name );
+        }
+    };
+
+    public ILoggerFactory getLoggerFactory()
+    {
+        return factory;
+    }
+
+    public String getLoggerFactoryClassStr()
+    {
+        return Gossip.class.getName();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/maven-embedder/src/main/java/org/slf4j/impl/StaticMDCBinder.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/slf4j/impl/StaticMDCBinder.java b/maven-embedder/src/main/java/org/slf4j/impl/StaticMDCBinder.java
new file mode 100644
index 0000000..bd44a03
--- /dev/null
+++ b/maven-embedder/src/main/java/org/slf4j/impl/StaticMDCBinder.java
@@ -0,0 +1,46 @@
+package org.slf4j.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.slf4j.helpers.BasicMDCAdapter;
+import org.slf4j.spi.MDCAdapter;
+
+/**
+ * Gossip MDC binder for SLF4J.
+ *
+ * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
+ * @since 1.0
+ */
+public final class StaticMDCBinder
+{
+    public static final org.slf4j.impl.StaticMDCBinder SINGLETON = new org.slf4j.impl.StaticMDCBinder();
+
+    private final BasicMDCAdapter adapter = new BasicMDCAdapter();
+
+    public MDCAdapter getMDCA()
+    {
+        return adapter;
+    }
+
+    public String getMDCAdapterClassStr()
+    {
+        return adapter.getClass().getName();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/maven-embedder/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/slf4j/impl/StaticMarkerBinder.java b/maven-embedder/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
new file mode 100644
index 0000000..4e9b26d
--- /dev/null
+++ b/maven-embedder/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
@@ -0,0 +1,45 @@
+package org.slf4j.impl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.slf4j.IMarkerFactory;
+import org.slf4j.helpers.BasicMarkerFactory;
+import org.slf4j.spi.MarkerFactoryBinder;
+
+/**
+ * Maven Gossip boostrap.
+ */
+public final class StaticMarkerBinder
+    implements MarkerFactoryBinder
+{
+  public static final org.slf4j.impl.StaticMarkerBinder SINGLETON = new org.slf4j.impl.StaticMarkerBinder();
+
+  private final IMarkerFactory factory = new BasicMarkerFactory();
+
+  public IMarkerFactory getMarkerFactory()
+  {
+    return factory;
+  }
+
+  public String getMarkerFactoryClassStr()
+  {
+    return factory.getClass().getName();
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven/blob/b9e9d329/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cd5bdaa..5724de5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -276,7 +276,7 @@
       </dependency>
       <dependency>
         <groupId>org.sonatype.gossip</groupId>
-        <artifactId>gossip-slf4j</artifactId>
+        <artifactId>gossip-core</artifactId>
         <version>${gossipVersion}</version>
       </dependency>
       <dependency>