chore: do not print error message if ldk log directory does not exist (#1859)

This commit is contained in:
Roland 2025-10-24 16:41:39 +07:00 committed by GitHub
parent da3396c276
commit c09f7059eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2026,6 +2026,10 @@ func deleteOldLDKLogs(ldkLogDir string) {
logger.Logger.WithField("ldkLogDir", ldkLogDir).Debug("Deleting old LDK logs")
files, err := os.ReadDir(ldkLogDir)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
// no log file directory - expected when VSS is enabled
return
}
logger.Logger.WithField("path", ldkLogDir).WithError(err).Error("Failed to list ldk log directory")
return
}