Back to godoc.org
github.com/2637309949/bulrush-logger

Package logger

v0.0.0-...-cd6ea81
Latest Go to latest

The highest tagged major version is .

Published: Oct 22, 2019 | License: MIT | Module: github.com/2637309949/bulrush-logger

Index

func LeftV

func LeftV(left interface{}, right interface{}) interface{}

LeftV -

func Some

func Some(target interface{}, initValue interface{}) interface{}

Some get or a default value

type Logger

type Logger struct {
	Format func(*Payload, *gin.Context) string
	Path   string
}

Logger plugin

func (*Logger) Plugin

func (logger *Logger) Plugin(cfg *bulrush.Config, router *gin.RouterGroup)

Plugin for Recovery

type Payload

type Payload struct {
	StartUnix int64
	EndUnix   int64
	Type      Type
	Latency   float64
	Method    string
	IP        string
	URL       string
}

Payload in request

type Type

type Type int

Type logger type

const (
	// INT logger type
	INT Type = iota + 1
	// OUT logger type
	OUT
)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier