Browse Source

print error log to client side when dev mode

for-closed-social
Unknwon 9 years ago
parent
commit
21ad4bf0fe
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      cmd/serve.go

+ 3
- 0
cmd/serve.go View File

@ -76,6 +76,9 @@ func fail(userMessage, logMessage string, args ...interface{}) {
fmt.Fprintln(os.Stderr, "Gogs:", userMessage) fmt.Fprintln(os.Stderr, "Gogs:", userMessage)
if len(logMessage) > 0 { if len(logMessage) > 0 {
if !setting.ProdMode {
fmt.Fprintf(os.Stderr, logMessage, args...)
}
log.GitLogger.Fatal(3, logMessage, args...) log.GitLogger.Fatal(3, logMessage, args...)
return return
} }

Loading…
Cancel
Save