xlog

package
v0.0.0-...-ddfd2c2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FReqID   = "reqid"   // http request id
	FIP      = "ip"      // http client ip
	FPath    = "path"    // http request url path
	FMethod  = "method"  // http request method
	FOS      = "os"      // user agent os
	FBrowser = "browser" // user agent browser
)

common field names

Variables

keep X usable(not panic) before Setup

Functions

func F

func F(args ...any) *logrus.Entry

F is a shortcut of withFields

withFields usage:  xlog.withFields(logrus.Fields{"key", value, ...}).Info(...)
F usage: xlog.F("key", value, ...).Info(...)

func Setup

func Setup(debug bool, conf *config.ViperConfig)

配置日志

Types

This section is empty.

Jump to

Keyboard shortcuts

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