mplog

package
v0.0.0-...-3faa710 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package mplog log User: 姜伟 Time: 2020-02-19 04:52:43

Index

Constants

View Source
const (

	// LogTypeDebug Debug
	LogTypeDebug = 1
	// LogTypeWarn Warn
	LogTypeWarn = 2
	// LogTypeInfo Info
	LogTypeInfo = 3
	// LogTypeError Error
	LogTypeError = 4
	// LogTypeDPanic DPanic
	LogTypeDPanic = 5
	// LogTypePanic Panic
	LogTypePanic = 6
	// LogTypeFatal Fatal
	LogTypeFatal = 7
)

Variables

This section is empty.

Functions

func Load

func Load(conf *viper.Viper, fields map[string]interface{}, extend map[string]interface{})

Load 初始化加载

func LogDPanic

func LogDPanic(msg string, fields ...LogField)

LogDPanic DPanic日志

func LogDebug

func LogDebug(msg string, fields ...LogField)

LogDebug Debug日志

func LogError

func LogError(msg string, fields ...LogField)

LogError Error日志

func LogFatal

func LogFatal(msg string, fields ...LogField)

LogFatal Fatal日志

func LogInfo

func LogInfo(msg string, fields ...LogField)

LogInfo Info日志

func LogPanic

func LogPanic(msg string, fields ...LogField)

LogPanic Panic日志

func LogWarn

func LogWarn(msg string, fields ...LogField)

LogWarn Warn日志

Types

type LogField

type LogField struct {
	Key string
	Val interface{}
}

LogField 日志字段

Jump to

Keyboard shortcuts

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