From: David Ostrovsky Date: Wed, 19 Mar 2014 07:11:51 +0000 (+0100) Subject: Be more verbose on gathering plugin's extension points X-Git-Tag: v1.5.0~68^2~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=033e8c6026ec8925ba19b90fbcb9cb5427fe04ca;p=gitblit.git Be more verbose on gathering plugin's extension points --- diff --git a/src/main/java/com/gitblit/transport/ssh/commands/RootDispatcher.java b/src/main/java/com/gitblit/transport/ssh/commands/RootDispatcher.java index 749d10ea..896391fa 100644 --- a/src/main/java/com/gitblit/transport/ssh/commands/RootDispatcher.java +++ b/src/main/java/com/gitblit/transport/ssh/commands/RootDispatcher.java @@ -17,6 +17,9 @@ package com.gitblit.transport.ssh.commands; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.gitblit.manager.IGitblit; import com.gitblit.models.UserModel; import com.gitblit.transport.ssh.SshDaemonClient; @@ -30,6 +33,8 @@ import com.gitblit.transport.ssh.gitblit.GitblitDispatcher; */ public class RootDispatcher extends DispatchCommand { + private Logger log = LoggerFactory.getLogger(getClass()); + public RootDispatcher(IGitblit gitblit, SshDaemonClient client, String cmdLine) { super(); setContext(new SshCommandContext(gitblit, client, cmdLine)); @@ -40,6 +45,10 @@ public class RootDispatcher extends DispatchCommand { List exts = gitblit.getExtensions(DispatchCommand.class); for (DispatchCommand ext : exts) { + Class extClass = ext.getClass(); + String plugin = gitblit.whichPlugin(extClass).getDescriptor().getPluginId(); + CommandMetaData meta = extClass.getAnnotation(CommandMetaData.class); + log.info("Dispatcher {} is loaded from plugin {}", meta.name(), plugin); registerDispatcher(user, ext); } }