Skip to content

Commit 11d8bef

Browse files
committed
optimize error logs by providing absolute file paths
Signed-off-by: zouyee <[email protected]>
1 parent 7feb1f3 commit 11d8bef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/remotes/docker/config/hosts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func loadHostDir(ctx context.Context, hostsDir string) ([]hostConfig, error) {
308308

309309
hosts, err := parseHostsFile(hostsDir, b)
310310
if err != nil {
311-
log.G(ctx).WithError(err).Error("failed to decode hosts.toml")
311+
log.G(ctx).WithError(err).Errorf("failed to decode %s", filepath.Join(hostsDir, "hosts.toml"))
312312
// Fallback to checking certificate files
313313
return loadCertFiles(ctx, hostsDir)
314314
}

0 commit comments

Comments
 (0)