rk_gin_log

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Copyright (c) 2020 rookie-ninja

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	RequestIdKeyLowerCase = "requestid"
	RequestIdKeyDash      = "request-id"
	RequestIdKeyUnderline = "request_id"
	RequestIdKeyDefault   = RequestIdKeyDash
	RKEventKey            = "rk-event"
	RKLoggerKey           = "rk-logger"
)

Variables

This section is empty.

Functions

func RkGinLog

func RkGinLog(opts ...Option) gin.HandlerFunc

RkGinZap returns a gin.HandlerFunc (middleware) that logs requests using uber-go/zap.

Types

type Option

type Option func(*options)

func WithEnableLogging

func WithEnableLogging(enable bool) Option

func WithEnableMetrics

func WithEnableMetrics(enable bool) Option

func WithEventFactory

func WithEventFactory(factory *rk_query.EventFactory) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL