Merge pull request #1014 from ijc/log-when-skipping-a-plugin

Do not claim to be loading a plugin which we aren't.
This commit is contained in:
Kenfe-Mickaël Laventure 2017-06-15 07:31:46 -07:00 committed by GitHub
commit 40fbd282cc

View File

@ -117,10 +117,11 @@ func main() {
) )
for _, init := range plugin.Graph() { for _, init := range plugin.Graph() {
id := init.URI() id := init.URI()
log.G(global).WithField("type", init.Type).Infof("loading plugin %q...", id)
if !shouldLoad(init) { if !shouldLoad(init) {
log.G(global).WithField("type", init.Type).Infof("skipping plugin %q...", id)
continue continue
} }
log.G(global).WithField("type", init.Type).Infof("loading plugin %q...", id)
ic := plugin.NewContext(plugins) ic := plugin.NewContext(plugins)
ic.Root = filepath.Join(conf.Root, id) ic.Root = filepath.Join(conf.Root, id)
ic.Context = log.WithModule(global, id) ic.Context = log.WithModule(global, id)