Documentation
¶
Index ¶
- Variables
- func AutoInitLoggerWithConfig()
- func GetDefaultLogSingletons() *fileLogger.FileLogger
- func NewLogInstance(config LogConfig) *fileLogger.FileLogger
- func SetDefaultLogConfig(fileDir, fileName, prefix string, logScan int64, logSeq int, level Level, ...)
- type EmptyLog
- func (f *EmptyLog) Debug(v ...interface{})
- func (f *EmptyLog) Debugf(format string, v ...interface{})
- func (f *EmptyLog) Error(v ...interface{})
- func (f *EmptyLog) Errorf(format string, v ...interface{})
- func (f *EmptyLog) Fields() Fields
- func (f *EmptyLog) Info(v ...interface{})
- func (f *EmptyLog) Infof(format string, v ...interface{})
- func (f *EmptyLog) Prefix() string
- func (f *EmptyLog) Print(v ...interface{})
- func (f *EmptyLog) Printf(format string, v ...interface{})
- func (f *EmptyLog) SetLevel(level Level)
- func (f *EmptyLog) Trace(v ...interface{})
- func (f *EmptyLog) Tracef(format string, v ...interface{})
- func (f *EmptyLog) Warn(v ...interface{})
- func (f *EmptyLog) Warnf(format string, v ...interface{})
- func (f *EmptyLog) WithFields(fields Fields) FieldsLogger
- func (f *EmptyLog) WithPrefix(prefix string) FieldsLogger
- type FieLog
- func (f *FieLog) Debug(v ...interface{})
- func (f *FieLog) Debugf(format string, v ...interface{})
- func (f *FieLog) Error(v ...interface{})
- func (f *FieLog) Errorf(format string, v ...interface{})
- func (f *FieLog) Fields() Fields
- func (f *FieLog) Info(v ...interface{})
- func (f *FieLog) Infof(format string, v ...interface{})
- func (f *FieLog) Prefix() string
- func (f *FieLog) Print(v ...interface{})
- func (f *FieLog) Printf(format string, v ...interface{})
- func (f *FieLog) SetLevel(level Level)
- func (f *FieLog) Trace(v ...interface{})
- func (f *FieLog) Tracef(format string, v ...interface{})
- func (f *FieLog) Warn(v ...interface{})
- func (f *FieLog) Warnf(format string, v ...interface{})
- func (f *FieLog) WithFields(fields Fields) FieldsLogger
- func (f *FieLog) WithPrefix(prefix string) FieldsLogger
- type Fields
- type FieldsLogger
- type Level
- type LogConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultLogConfig = &LogConfig{"./", "sys.log", "", 300, 1000, false, fileLogger.TRACE}
)
Functions ¶
func AutoInitLoggerWithConfig ¶
func AutoInitLoggerWithConfig()
func GetDefaultLogSingletons ¶
func GetDefaultLogSingletons() *fileLogger.FileLogger
GetDefaultLogSingletons 获取default log单例
func NewLogInstance ¶
func NewLogInstance(config LogConfig) *fileLogger.FileLogger
Types ¶
type EmptyLog ¶
type EmptyLog struct {
}
************************** Empty Implement ****************************
func NewEmptyLogger ¶
func NewEmptyLogger() *EmptyLog
func (*EmptyLog) WithFields ¶
func (f *EmptyLog) WithFields(fields Fields) FieldsLogger
func (*EmptyLog) WithPrefix ¶
func (f *EmptyLog) WithPrefix(prefix string) FieldsLogger
type FieLog ¶
type FieLog struct {
Logger *fileLogger.FileLogger
// contains filtered or unexported fields
}
func NewFieLogger ¶
NewFieLogger 是以default log单例作为instance,所以不仅会受制于本身的log level,也会受制于default log 的log level
func (*FieLog) WithFields ¶
func (f *FieLog) WithFields(fields Fields) FieldsLogger
func (*FieLog) WithPrefix ¶
func (f *FieLog) WithPrefix(prefix string) FieldsLogger
type FieldsLogger ¶
type FieldsLogger interface {
Print(args ...interface{})
Printf(format string, args ...interface{})
Trace(args ...interface{})
Tracef(format string, args ...interface{})
Debug(args ...interface{})
Debugf(format string, args ...interface{})
Info(args ...interface{})
Infof(format string, args ...interface{})
Warn(args ...interface{})
Warnf(format string, args ...interface{})
Error(args ...interface{})
Errorf(format string, args ...interface{})
WithPrefix(prefix string) FieldsLogger
Prefix() string
WithFields(fields Fields) FieldsLogger
Fields() Fields
SetLevel(level Level)
}
Click to show internal directories.
Click to hide internal directories.