Next logging package for the Go programming language based on log4go, std log lib, logrus, uber zap
Drivered
About Entry
// A Entry contains all of the pertinent information for each message
// It is the final or intermediate logging entry also. It contains all
// the fields passed with WithField{,s}. It's finally logged when Trace, Debug,
// Info, Warn, Error, Fatal or Panic is called on it.
type Entry struct {
Level int // The log level
Created time.Time // The time at which the log message was created (nanoseconds)
Prefix string // The message prefix
Source string // The message source
Line int // The source line
Message string // The log message
Data map[string]interface{} // Contains all the fields set by the user.
}
Version 2.0 is comming soon...
LogRecord changes to:
type LogRecord struct {
logger *Logger
Level Level // The log level
Created time.Time // The time at which the log message was created (nanoseconds)
Prefix string // The prefix
Source string // The source
Line int // The source line
Message string // The log message
Data map[string]interface{} // Contains all the fields set by the user.
}
LoadConfiguration return []error
Layout new pattern:
nxlog4go_test.go separates into a few test files
Bug fixed.
Using "func (l Logger)" caused mu.Lock() not working. Changes to "func (l *Logger)".
Arguments change.
'func (l Logger) Log(calldepth int, lvl Level, message string)'
is changed to:
'func (l *Logger) Log(level Level, args ...interface{})'
func (l Logger) Debug(arg0 interface{}, args ...interface{})
is changed to:
func (l *Logger) Debug(args ...interface{})
wrapper.go
is renamed to logging.go
log.Debug.With(key, valure).Info("message")