From 11d8beff80ef3eea89bbb7d75299ff4b712d96dd Mon Sep 17 00:00:00 2001 From: zouyee Date: Tue, 30 Apr 2024 09:08:01 +0800 Subject: [PATCH] optimize error logs by providing absolute file paths Signed-off-by: zouyee --- core/remotes/docker/config/hosts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/remotes/docker/config/hosts.go b/core/remotes/docker/config/hosts.go index 8baccc941..a9b8691fe 100644 --- a/core/remotes/docker/config/hosts.go +++ b/core/remotes/docker/config/hosts.go @@ -308,7 +308,7 @@ func loadHostDir(ctx context.Context, hostsDir string) ([]hostConfig, error) { hosts, err := parseHostsFile(hostsDir, b) if err != nil { - log.G(ctx).WithError(err).Error("failed to decode hosts.toml") + log.G(ctx).WithError(err).Errorf("failed to decode %s", filepath.Join(hostsDir, "hosts.toml")) // Fallback to checking certificate files return loadCertFiles(ctx, hostsDir) }