log

package
v7.21.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log只是SDK本身自己使用,用来调试代码使用,比如输出HTTP请求和响应信息

Index

Constants

View Source
const (
	InfoPrefix  = "[I] "
	DebugPrefix = "[D] "
	WarnPrefix  = "[W] "
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Info

func Info(v ...interface{})

func Warn

func Warn(v ...interface{})

Types

type LogLevel

type LogLevel int
const (
	// LogDebug 调试模式
	LogDebug LogLevel = iota

	// Info
	LogInfo

	// Warn
	LogWarn
)

type Logger

type Logger struct {
	*log.Logger
	// contains filtered or unexported fields
}

func New

func New(out io.Writer, prefix string, flag int, level LogLevel) *Logger

New 返回一个Logger 指针

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

Jump to

Keyboard shortcuts

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