Documentation ¶
Index ¶
- Constants
- func AppName() string
- func Close()
- func Critical(v ...any)
- func Criticalf(format string, v ...any)
- func Debug(v ...any)
- func Debugf(format string, v ...any)
- func Error(v ...any)
- func Errorf(format string, v ...any)
- func GenFilename(dir, app string) string
- func Info(v ...any)
- func Infof(format string, v ...any)
- func Init(opts Options)
- func InitConsole()
- func InitDir(dirname string)
- func InitFile(filename string)
- func OpenFile(filename string, append bool) *os.File
- func Panicf(format string, v ...any)
- func Print(level Level, v ...any)
- func Printf(level Level, format string, v ...any)
- func Query(f Filter) (lines []string, err error)
- func QueryFromFile(filename string, f Filter) (ret []string, err error)
- func Recover()
- func SetHook(hook func(Message))
- func Stat() string
- func StdBridge(onMessage func(string)) *log.Logger
- func Trace(v ...any)
- func Tracef(format string, v ...any)
- func Warning(v ...any)
- func Warningf(format string, v ...any)
- type Filter
- type Level
- type Log
- func (o *Log) Branch(prefix string) *Log
- func (o *Log) Close()
- func (o *Log) Critical(v ...any)
- func (o *Log) Criticalf(format string, v ...any)
- func (o *Log) Debug(v ...any)
- func (o *Log) Debugf(format string, v ...any)
- func (o *Log) Enable(enable bool) *Log
- func (o *Log) Enabled() bool
- func (o *Log) Error(v ...any)
- func (o *Log) Errorf(format string, v ...any)
- func (o *Log) Info(v ...any)
- func (o *Log) Infof(format string, v ...any)
- func (o *Log) Init(opts Options) *Log
- func (o *Log) IsGloabl() bool
- func (o *Log) Print(level Level, v ...any)
- func (o *Log) Printf(level Level, format string, v ...any)
- func (o *Log) Query(f Filter) (lines []string, err error)
- func (o *Log) Recover()
- func (o *Log) SetHook(hook func(Message))
- func (o *Log) Stat()
- func (o *Log) Trace(v ...any)
- func (o *Log) Tracef(format string, v ...any)
- func (o *Log) Warning(v ...any)
- func (o *Log) Warningf(format string, v ...any)
- func (o *Log) WithID(id any) *Log
- func (o *Log) WithLevel(level Level) *Log
- func (o *Log) WithLifetime() *Log
- func (o *Log) WithLifetimeDebug() *Log
- type Message
- type Options
- type Statistics
- type StdWriter
Constants ¶
View Source
const LevelDefault = LevelInfo
Variables ¶
This section is empty.
Functions ¶
func GenFilename ¶
func InitConsole ¶
func InitConsole()
func QueryFromFile ¶ added in v0.1.45
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) WithLifetime ¶
func (*Log) WithLifetimeDebug ¶
type Message ¶
type Message struct { Time time.Time GoID int Level Level Text string // contains filtered or unexported fields }
func NewMessage ¶
Click to show internal directories.
Click to hide internal directories.