Skip to content

Commit

Permalink
Add Extension logger
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Jul 26, 2024
1 parent 33f2d64 commit f2eb962
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package com.jd.live.agent.core.extension.jplug;

import com.jd.live.agent.bootstrap.logger.Logger;
import com.jd.live.agent.bootstrap.logger.LoggerFactory;
import com.jd.live.agent.core.extension.*;
import com.jd.live.agent.core.extension.ExtensionEvent.EventType;
import com.jd.live.agent.core.extension.annotation.Extensible;
Expand All @@ -34,6 +36,8 @@
*/
public class JExtensionManager implements ExtensionManager {

private static final Logger logger = LoggerFactory.getLogger(JExtensionManager.class);

private final ConditionMatcher matcher;

private final Map<Class<?>, ExtensibleDesc<?>> extensibles = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -153,6 +157,9 @@ public <T> ExtensibleDesc<T> loadExtensible(Class<T> extensible, ExtensionLoader
// Sort
Comparator<ExtensionDesc<?>> c = ExtensionDesc.AscendingComparator.INSTANCE;
extensionDescList.sort(c);
if (logger.isInfoEnabled()) {
logger.info("Load extensible {} success", name);
}
// No need to cache objects in the loading method
return new JExtensible<>(name, extensionDescList);
}
Expand Down

0 comments on commit f2eb962

Please sign in to comment.