[GitHub] [maven-doxia] elharo commented on a change in pull request #8: [DOXIA-534] Migrate logging to slf4j and deprecate doxia-logging-api

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [maven-doxia] elharo commented on a change in pull request #8: [DOXIA-534] Migrate logging to slf4j and deprecate doxia-logging-api

GitBox
elharo commented on a change in pull request #8: [DOXIA-534] Migrate logging to slf4j and deprecate doxia-logging-api
URL: https://github.com/apache/maven-doxia/pull/8#discussion_r395993498
 
 

 ##########
 File path: doxia-logging-api/src/main/java/org/apache/maven/doxia/logging/Slf4jLoggerWrapper.java
 ##########
 @@ -0,0 +1,143 @@
+package org.apache.maven.doxia.logging;
+
+/*
+ * 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.Logger;
+
+/**
+ * Wrap a Slf4j logger into a Doxia logger.
+ *
+ * @since 1.7
+ * @deprecated use directly slf4j
+ */
+@Deprecated
+public class Slf4jLoggerWrapper implements Log
+{
+
+    private Logger logger;
+
+    public Slf4jLoggerWrapper( Logger log )
+    {
+        logger = log;
+    }
+
+    public void setLogLevel( int level )
+    {
+        // ignore - managed outside
+    }
+
+    public void debug( CharSequence content )
+    {
+        if ( logger.isDebugEnabled() )
 
 Review comment:
   use braces in multiline ifs

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]