gnodet-bot commented on code in PR #13832:
URL: https://github.com/apache/maven/pull/13832#discussion_r4495034984


##########
api/maven-api-log/src/main/java/org/apache/maven/api/logging/LoggerManager.java:
##########
@@ -0,0 +1,208 @@
+/*
+ * 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.
+ */
+package org.apache.maven.api.logging;
+
+import java.util.ServiceConfigurationError;
+import java.util.ServiceLoader;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
+import org.apache.maven.api.annotations.Provider;
+
+/**
+ * Central entry point for Maven's logging system.
+ * <p>
+ * Provides access to loggers, the active {@link LogSink}, level configuration,
+ * and severity tracking for {@code --fail-on-severity}.
+ * <p>
+ * The singleton is resolved lazily on the first {@link #get()} call using
+ * {@link ServiceLoader}. If no provider is found, a buffering fallback is
+ * installed that accumulates events until a real implementation is set via
+ * {@link #set(LoggerManager)}.
+ *
+ * @since 4.2.0
+ */
+@Experimental
+@Provider
+public interface LoggerManager {
+
+    /**
+     * Returns a {@link Logger} instance for the given name.
+     *
+     * @since 4.2.0
+     */
+    @Nonnull
+    Logger getLogger(@Nonnull String name);
+
+    /**
+     * Returns a {@link Logger} instance for the given class.
+     *
+     * @since 4.2.0
+     */
+    @Nonnull
+    default Logger getLogger(@Nonnull Class<?> clazz) {
+        return getLogger(clazz.getName());
+    }
+
+    /**
+     * Returns the active log sink, or {@code null} if none is installed.
+     */

Review Comment:
   🟡 **Missing `@since 4.2.0` on 8 public API methods** — `LoggerManager` is a 
new `@Experimental` public interface added in this PR. All new API methods 
require `@since 4.2.0`. The following methods lack it:
   
   - `getLogSink()` (L64–68)
   - `setLogSink()` (L70–73)
   - `isLevelEnabled()` (L75–78)
   - `setRootLoggerLevel()` (L80–84)
   - `reconfigure()` (L86–89)
   - `hasReached()` (L91–98)
   - `get()` (L124–135)
   - `set()` (L143–155)
   
   The four new default methods (`registerPluginClassLoader`, `getPluginId`) 
were fixed in this commit, but the core abstract methods and static factory 
methods were missed. Add `@since 4.2.0` to each Javadoc block before the 
closing `*/`.



##########
api/maven-api-log/src/main/java/org/apache/maven/api/logging/LoggerManager.java:
##########
@@ -0,0 +1,208 @@
+/*
+ * 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.
+ */
+package org.apache.maven.api.logging;
+
+import java.util.ServiceConfigurationError;
+import java.util.ServiceLoader;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
+import org.apache.maven.api.annotations.Provider;
+
+/**
+ * Central entry point for Maven's logging system.
+ * <p>
+ * Provides access to loggers, the active {@link LogSink}, level configuration,
+ * and severity tracking for {@code --fail-on-severity}.
+ * <p>
+ * The singleton is resolved lazily on the first {@link #get()} call using
+ * {@link ServiceLoader}. If no provider is found, a buffering fallback is
+ * installed that accumulates events until a real implementation is set via
+ * {@link #set(LoggerManager)}.
+ *
+ * @since 4.2.0
+ */
+@Experimental
+@Provider
+public interface LoggerManager {
+
+    /**
+     * Returns a {@link Logger} instance for the given name.
+     *
+     * @since 4.2.0
+     */
+    @Nonnull
+    Logger getLogger(@Nonnull String name);
+
+    /**
+     * Returns a {@link Logger} instance for the given class.
+     *
+     * @since 4.2.0
+     */
+    @Nonnull
+    default Logger getLogger(@Nonnull Class<?> clazz) {
+        return getLogger(clazz.getName());
+    }
+
+    /**
+     * Returns the active log sink, or {@code null} if none is installed.
+     */

Review Comment:
   🟡 **Missing `@since 4.2.0` on 8 public API methods** — `LoggerManager` is a 
new `@Experimental` public interface added in this PR. All new API methods 
require `@since 4.2.0`. The following methods lack it:
   
   - `getLogSink()` (L64–68)
   - `setLogSink()` (L70–73)
   - `isLevelEnabled()` (L75–78)
   - `setRootLoggerLevel()` (L80–84)
   - `reconfigure()` (L86–89)
   - `hasReached()` (L91–98)
   - `get()` (L124–135)
   - `set()` (L143–155)
   
   The four new default methods (`registerPluginClassLoader`, `getPluginId`) 
were fixed in this commit, but the core abstract methods and static factory 
methods were missed. Add `@since 4.2.0` to each Javadoc block before the 
closing `*/`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to