Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7c371ee3
Commit
7c371ee3
authored
Apr 24, 2015
by
Masahiro Sano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lower log level on recovering from panic
parent
159a58dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
handlers.go
pkg/apiserver/handlers.go
+1
-1
util.go
pkg/util/util.go
+1
-1
No files found.
pkg/apiserver/handlers.go
View file @
7c371ee3
...
@@ -113,7 +113,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
...
@@ -113,7 +113,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
defer
func
()
{
defer
func
()
{
if
x
:=
recover
();
x
!=
nil
{
if
x
:=
recover
();
x
!=
nil
{
http
.
Error
(
w
,
"apis panic. Look in log for details."
,
http
.
StatusInternalServerError
)
http
.
Error
(
w
,
"apis panic. Look in log for details."
,
http
.
StatusInternalServerError
)
glog
.
Info
f
(
"APIServer panic'd on %v %v: %v
\n
%s
\n
"
,
req
.
Method
,
req
.
RequestURI
,
x
,
debug
.
Stack
())
glog
.
Error
f
(
"APIServer panic'd on %v %v: %v
\n
%s
\n
"
,
req
.
Method
,
req
.
RequestURI
,
x
,
debug
.
Stack
())
}
}
}()
}()
defer
httplog
.
NewLogged
(
req
,
&
w
)
.
StacktraceWhen
(
defer
httplog
.
NewLogged
(
req
,
&
w
)
.
StacktraceWhen
(
...
...
pkg/util/util.go
View file @
7c371ee3
...
@@ -66,7 +66,7 @@ func logPanic(r interface{}) {
...
@@ -66,7 +66,7 @@ func logPanic(r interface{}) {
}
}
callers
=
callers
+
fmt
.
Sprintf
(
"%v:%v
\n
"
,
file
,
line
)
callers
=
callers
+
fmt
.
Sprintf
(
"%v:%v
\n
"
,
file
,
line
)
}
}
glog
.
Info
f
(
"Recovered from panic: %#v (%v)
\n
%v"
,
r
,
r
,
callers
)
glog
.
Error
f
(
"Recovered from panic: %#v (%v)
\n
%v"
,
r
,
r
,
callers
)
}
}
// ErrorHandlers is a list of functions which will be invoked when an unreturnable
// ErrorHandlers is a list of functions which will be invoked when an unreturnable
...
...
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