New logging; JSON and structured log formats

This commit is contained in:
DarthSim
2019-09-16 15:53:45 +06:00
parent 83c00a9e2b
commit 16784fb1e2
13 changed files with 322 additions and 111 deletions

View File

@@ -19,12 +19,12 @@ func (e *imgproxyError) Error() string {
return e.Message
}
func (e *imgproxyError) ErrorWithStack() string {
func (e *imgproxyError) FormatStack() string {
if e.stack == nil {
return e.Message
return ""
}
return fmt.Sprintf("%s\n%s", e.Message, formatStack(e.stack))
return formatStack(e.stack)
}
func (e *imgproxyError) StackTrace() []uintptr {