Documentation
¶
Index ¶
- Variables
- func Alert(f any, v ...any)
- func Debug(f any, v ...any)
- func DelOutput(name string)
- func Error(f any, v ...any)
- func Fatal(f any, v ...any)
- func Panic(f any, v ...any)
- func SetCallDepth(depth int)
- func SetLevel(level Level)
- func SetOutput(name string, output Output) error
- func SetPathTrim(trimPath ...string)
- func Sprintf(format any, args ...any) (text string)
- func Trace(f any, v ...any)
- type Conn
- type File
- type Level
- type Logger
- func (this *Logger) Alert(format interface{}, args ...interface{})
- func (this *Logger) Debug(format interface{}, v ...interface{})
- func (this *Logger) DelOutput(name string)
- func (this *Logger) Error(format interface{}, v ...interface{})
- func (this *Logger) Fatal(format any, args ...any)
- func (this *Logger) Panic(format any, args ...any)
- func (this *Logger) SetCallDepth(depth int)
- func (this *Logger) SetLevel(level Level)
- func (this *Logger) SetOutput(name string, output Output) error
- func (this *Logger) SetPathTrim(trimPath ...string)
- func (this *Logger) Sprint(level Level, format any, args ...any)
- func (this *Logger) Trace(format interface{}, v ...interface{})
- func (this *Logger) TrimPath(s string) (r string)
- func (this *Logger) Write(msg *Message)
- type Message
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var Console = &console{colorful: true}
Functions ¶
func SetCallDepth ¶ added in v0.0.2
func SetCallDepth(depth int)
Types ¶
type Conn ¶ added in v0.0.2
type File ¶ added in v0.0.2
type File struct { Sprintf func(*Message) *strings.Builder //格式化message // contains filtered or unexported fields }
func (*File) GetFileName ¶ added in v0.0.3
func (*File) SetFileName ¶ added in v0.0.3
func (this *File) SetFileName(f file.NameFormatter)
SetFileName 设置日志文件名, 前缀(string) 或者 fileNameFormatter
func (*File) SetFileSize ¶ added in v0.1.0
SetFileSize 设置文件大小(M),默认无限制
type Level ¶ added in v0.0.2
type Level int8
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) Debug ¶
func (this *Logger) Debug(format interface{}, v ...interface{})
Debug Log DEBUG level message.
func (*Logger) Error ¶
func (this *Logger) Error(format interface{}, v ...interface{})
Error Log ERROR level message.
func (*Logger) SetCallDepth ¶
func (*Logger) SetPathTrim ¶ added in v0.0.2
SetPathTrim 设置日志起始路径
Source Files
¶
Click to show internal directories.
Click to hide internal directories.