Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
24a25453
Commit
24a25453
authored
Sep 30, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(server): shutdown logging fixes
parent
5ec86a9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
pkg/cmd/grafana-server/main.go
+1
-1
pkg/cmd/grafana-server/server.go
+2
-3
No files found.
pkg/cmd/grafana-server/main.go
View file @
24a25453
...
@@ -107,7 +107,7 @@ func listenToSystemSignals(server models.GrafanaServer) {
...
@@ -107,7 +107,7 @@ func listenToSystemSignals(server models.GrafanaServer) {
select
{
select
{
case
sig
:=
<-
signalChan
:
case
sig
:=
<-
signalChan
:
server
.
Shutdown
(
0
,
fmt
.
Sprintf
(
"system signal
=
%s"
,
sig
))
server
.
Shutdown
(
0
,
fmt
.
Sprintf
(
"system signal
:
%s"
,
sig
))
case
code
=
<-
exitChan
:
case
code
=
<-
exitChan
:
server
.
Shutdown
(
code
,
"startup error"
)
server
.
Shutdown
(
code
,
"startup error"
)
}
}
...
...
pkg/cmd/grafana-server/server.go
View file @
24a25453
...
@@ -103,13 +103,12 @@ func (g *GrafanaServerImpl) startHttpServer() {
...
@@ -103,13 +103,12 @@ func (g *GrafanaServerImpl) startHttpServer() {
}
}
func
(
g
*
GrafanaServerImpl
)
Shutdown
(
code
int
,
reason
string
)
{
func
(
g
*
GrafanaServerImpl
)
Shutdown
(
code
int
,
reason
string
)
{
log
.
Info
(
"Shutting down"
,
"code"
,
code
,
"reason"
,
reason
)
g
.
log
.
Info
(
"Shutting down"
,
"code"
,
code
,
"reason"
,
reason
)
g
.
shutdownFn
()
g
.
shutdownFn
()
err
:=
g
.
childRoutines
.
Wait
()
err
:=
g
.
childRoutines
.
Wait
()
log
.
Info
(
"Shutting down completed"
,
"error"
,
err
)
g
.
log
.
Info
(
"Shutting down completed"
,
"reason"
,
err
)
log
.
Close
()
log
.
Close
()
os
.
Exit
(
code
)
os
.
Exit
(
code
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment