mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
Merge pull request #4288 from MichaelEischer/log-warnings-to-debug-log
Add warnings via Warnf to the debug log
This commit is contained in:
commit
7a60d9e54f
@ -78,5 +78,6 @@ func CleanupHandler(c <-chan os.Signal) {
|
|||||||
// given exit code.
|
// given exit code.
|
||||||
func Exit(code int) {
|
func Exit(code int) {
|
||||||
code = RunCleanupHandlers(code)
|
code = RunCleanupHandlers(code)
|
||||||
|
debug.Log("exiting with status code %d", code)
|
||||||
os.Exit(code)
|
os.Exit(code)
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,7 @@ func Warnf(format string, args ...interface{}) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "unable to write to stderr: %v\n", err)
|
fmt.Fprintf(os.Stderr, "unable to write to stderr: %v\n", err)
|
||||||
}
|
}
|
||||||
|
debug.Log(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// resolvePassword determines the password to be used for opening the repository.
|
// resolvePassword determines the password to be used for opening the repository.
|
||||||
|
Loading…
Reference in New Issue
Block a user