mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #12439 from grafana/fix-log-close-too-early
Fix: Log close (ie flush) was done too early, before final shutdown log
This commit is contained in:
commit
59756863df
@ -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)
|
||||
}
|
||||
|
||||
|
@ -185,6 +185,8 @@ func (g *GrafanaServerImpl) Exit(reason error) {
|
||||
}
|
||||
|
||||
g.log.Error("Server shutdown", "reason", reason)
|
||||
|
||||
log.Close()
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user