Commit 59756863 by Marcus Efraimsson Committed by GitHub

Merge pull request #12439 from grafana/fix-log-close-too-early

Fix: Log close (ie flush) was done too early, before final shutdown log
parents c4292b43 7a7c6f8f
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"net/http" "net/http"
_ "net/http/pprof" _ "net/http/pprof"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/metrics" "github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/setting"
...@@ -88,9 +87,6 @@ func main() { ...@@ -88,9 +87,6 @@ func main() {
err := server.Run() err := server.Run()
trace.Stop()
log.Close()
server.Exit(err) server.Exit(err)
} }
......
...@@ -185,6 +185,8 @@ func (g *GrafanaServerImpl) Exit(reason error) { ...@@ -185,6 +185,8 @@ func (g *GrafanaServerImpl) Exit(reason error) {
} }
g.log.Error("Server shutdown", "reason", reason) g.log.Error("Server shutdown", "reason", reason)
log.Close()
os.Exit(code) os.Exit(code)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment