optimize error logs by providing absolute file paths

Signed-off-by: zouyee <zouyee1989@gmail.com>
This commit is contained in:
zouyee 2024-04-30 09:08:01 +08:00
parent 7feb1f327d
commit 11d8beff80

View File

@ -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)
}