mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Slightly improve error handling
Pass errors from Cobra runRoot() to main().
This commit is contained in:
parent
a628c4e01a
commit
57ca1d7d6e
2 changed files with 4 additions and 8 deletions
2
mux.go
2
mux.go
|
@ -34,7 +34,7 @@ func debugHandler(next http.Handler) http.Handler {
|
|||
func logHandler(next http.Handler) http.Handler {
|
||||
accessLog, err := os.OpenFile(Config.Log, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("error: %v", err)
|
||||
}
|
||||
|
||||
return handlers.CombinedLoggingHandler(accessLog, next)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue