logger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logger 自定义log

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debuge

func Debuge(msg string)

func Error

func Error(msg string)

func Info

func Info(msg string)

func Wane

func Wane(msg string)

Types

type LogLevel

type LogLevel uint16

LogLevel 设置日志级别

const (
	DEBUG LogLevel = iota
	INFO
	WARN
	ERROR
)

日志级别枚举

type Logger

type Logger struct {
	Level LogLevel

	Appenders int
	// contains filtered or unexported fields
}

Logger 日志结构体

func NewFileLog

func NewFileLog() *Logger

NewFileLog 自定义日志初始化

func (*Logger) Debug

func (f *Logger) Debug(msg string, a ...interface{})

Debug Debug日志

func (*Logger) Error

func (f *Logger) Error(msg string, a ...interface{})

Error Warning日志

func (*Logger) Info

func (f *Logger) Info(msg string, a ...interface{})

Info Info日志

func (*Logger) Warning

func (f *Logger) Warning(msg string, a ...interface{})

Warning Warning日志

Jump to

Keyboard shortcuts

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