refactor(watcher): Move API key client creation to watcher package

This commit is contained in:
hkfires
2025-09-19 11:13:03 +08:00
parent 2274d7488b
commit 4bfafbe3aa
3 changed files with 24 additions and 61 deletions

View File

@@ -2,10 +2,13 @@ package misc
import (
"path/filepath"
"strings"
log "github.com/sirupsen/logrus"
)
var credentialSeparator = strings.Repeat("-", 70)
// LogSavingCredentials emits a consistent log message when persisting auth material.
func LogSavingCredentials(path string) {
if path == "" {
@@ -14,3 +17,8 @@ func LogSavingCredentials(path string) {
// Use filepath.Clean so logs remain stable even if callers pass redundant separators.
log.Infof("Saving credentials to %s", filepath.Clean(path))
}
// LogCredentialSeparator adds a visual separator to group auth/key processing logs.
func LogCredentialSeparator() {
log.Info(credentialSeparator)
}