fix: log close/flush was done too early, before server shutdown log message was called, fixes #12438

(cherry picked from commit 7a7c6f8fab)
This commit is contained in:
Torkel Ödegaard
2018-06-29 10:56:00 +02:00
committed by Marcus Efraimsson
parent 1713f7f01d
commit 855b570878
2 changed files with 2 additions and 4 deletions
-4
View File
@@ -14,7 +14,6 @@ import (
"net/http"
_ "net/http/pprof"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/setting"
@@ -88,9 +87,6 @@ func main() {
err := server.Run()
trace.Stop()
log.Close()
server.Exit(err)
}
+2
View File
@@ -184,6 +184,8 @@ func (g *GrafanaServerImpl) Exit(reason error) {
}
g.log.Error("Server shutdown", "reason", reason)
log.Close()
os.Exit(code)
}