Documentation ¶
Overview ¶
* * @Author: TheLife * @Date: 2021/5/10 上午11:48
Index ¶
- Variables
- func NewLoggerMiddleware(isStdout, isWriter bool, serviceName string, writerDir string) (koa.HandlerFunc, error)
- func NewLoggerMiddlewareSmoothFail(isStdout, isWriter bool, serviceName string, writerDir string) koa.HandlerFunc
- func Recovery() koa.HandlerFunc
- func RecoveryWithWriter(out io.Writer) koa.HandlerFunc
- type LogFormatterParams
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultErrorWriter io.Writer = os.Stderr
Functions ¶
func NewLoggerMiddleware ¶
func NewLoggerMiddlewareSmoothFail ¶
func NewLoggerMiddlewareSmoothFail(isStdout, isWriter bool, serviceName string, writerDir string) koa.HandlerFunc
func Recovery ¶
func Recovery() koa.HandlerFunc
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func RecoveryWithWriter ¶
func RecoveryWithWriter(out io.Writer) koa.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
Types ¶
Click to show internal directories.
Click to hide internal directories.