From 21ad4bf0fe461b7bf04384dcc09e62f7e52c9803 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 23 Nov 2015 22:33:24 -0500 Subject: [PATCH] print error log to client side when dev mode --- cmd/serve.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/serve.go b/cmd/serve.go index 3d299e88..dc952cd1 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -76,6 +76,9 @@ func fail(userMessage, logMessage string, args ...interface{}) { fmt.Fprintln(os.Stderr, "Gogs:", userMessage) if len(logMessage) > 0 { + if !setting.ProdMode { + fmt.Fprintf(os.Stderr, logMessage, args...) + } log.GitLogger.Fatal(3, logMessage, args...) return }