Documentation ¶
Index ¶
- Constants
- func ChiLoggerRequest(next http.Handler) http.Handler
- func FromCtx(ctx context.Context) logrus.FieldLogger
- func Init(c Config) logrus.FieldLogger
- func InjectCtx(ctx context.Context, logger logrus.FieldLogger) context.Context
- func SessionLogger(logger logrus.FieldLogger) func(next http.Handler) http.Handler
- type Config
- type ContextKey
Constants ¶
View Source
const ( LogxContext ContextKey = "logx-context" UrlPath string = "url.path" UrlMethod string = "url.method" UrlPattern string = "url.pattern" )
Variables ¶
This section is empty.
Functions ¶
func FromCtx ¶
func FromCtx(ctx context.Context) logrus.FieldLogger
LoggerFromCtx if not exist will panic
func Init ¶
func Init(c Config) logrus.FieldLogger
func SessionLogger ¶
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.