mirror of
https://github.com/go-i2p/logger.git
synced 2025-12-01 05:55:00 -05:00
Add GetLevel and SetFormatter methods to Logger for enhanced logging control
This commit is contained in:
8
log.go
8
log.go
@@ -78,6 +78,14 @@ func (l *Logger) SetLevel(level Level) {
|
||||
l.Logger.SetLevel(logrus.Level(level))
|
||||
}
|
||||
|
||||
func (l *Logger) GetLevel() Level {
|
||||
return Level(l.Logger.GetLevel())
|
||||
}
|
||||
|
||||
func (l *Logger) SetFormatter(formatter *TextFormatter) {
|
||||
l.Logger.SetFormatter((*logrus.TextFormatter)(formatter))
|
||||
}
|
||||
|
||||
func warnFatal(args ...interface{}) {
|
||||
if failFast != "" {
|
||||
if log != nil {
|
||||
|
||||
Reference in New Issue
Block a user