mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 04:20:50 +08:00
25 lines
598 B
Go
25 lines
598 B
Go
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 == "" {
|
|
return
|
|
}
|
|
// 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)
|
|
}
|