From c35b20168522a7bc7a9509f30786821fb0e7233e Mon Sep 17 00:00:00 2001 From: Benny Ng Date: Fri, 6 Nov 2015 16:07:54 +0800 Subject: [PATCH] use log instead of fmt to obey the -log flag --- caddy/setup/errors.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/caddy/setup/errors.go b/caddy/setup/errors.go index 5aa09b9f..24e2b0bb 100644 --- a/caddy/setup/errors.go +++ b/caddy/setup/errors.go @@ -1,7 +1,6 @@ package setup import ( - "fmt" "io" "log" "os" @@ -108,7 +107,7 @@ func errorsParse(c *Controller) (*errors.ErrorHandler, error) { where = filepath.Join(c.Root, where) f, err := os.Open(where) if err != nil { - fmt.Println("Warning: Unable to open error page '" + where + "': " + err.Error()) + log.Printf("[WARNING] Unable to open error page '%s': %v", where, err) } f.Close()