From cf4995d8a7275b34adfb1d56f3ed81ee39c38750 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 3 Jan 2018 10:44:41 -0500 Subject: [PATCH] use the full module name with host for errors The module related logs and errors should reference the full module name including the source host. --- config/module/storage.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/module/storage.go b/config/module/storage.go index 0660812b0..c1588d684 100644 --- a/config/module/storage.go +++ b/config/module/storage.go @@ -295,17 +295,17 @@ func (s Storage) findRegistryModule(mSource, constraint string) (moduleRecord, e } rec.registry = true - log.Printf("[TRACE] %q is a registry module", mod.Module()) + log.Printf("[TRACE] %q is a registry module", mod.Display()) versions, err := s.moduleVersions(mod.String()) if err != nil { - log.Printf("[ERROR] error looking up versions for %q: %s", mod.Module(), err) + log.Printf("[ERROR] error looking up versions for %q: %s", mod.Display(), err) return rec, err } match, err := newestRecord(versions, constraint) if err != nil { - log.Printf("[INFO] no matching version for %q<%s>, %s", mod.Module(), constraint, err) + log.Printf("[INFO] no matching version for %q<%s>, %s", mod.Display(), constraint, err) } log.Printf("[DEBUG] matched %q version %s for %s", mod, match.Version, constraint) @@ -322,7 +322,7 @@ func (s Storage) findRegistryModule(mSource, constraint string) (moduleRecord, e } if len(resp.Modules) == 0 { - return rec, fmt.Errorf("module %q not found in registry", mod.Module()) + return rec, fmt.Errorf("module %q not found in registry", mod.Display()) } match, err := newestVersion(resp.Modules[0].Versions, constraint) @@ -331,7 +331,7 @@ func (s Storage) findRegistryModule(mSource, constraint string) (moduleRecord, e } if match == nil { - return rec, fmt.Errorf("no versions for %q found matching %q", mod.Module(), constraint) + return rec, fmt.Errorf("no versions for %q found matching %q", mod.Display(), constraint) } rec.Version = match.Version