actually make use of the LogLevel type
why else would it be defined? and this is sane anyway.
This commit is contained in:
+2
-2
@@ -41,7 +41,7 @@ type FileLogWriter struct {
|
||||
|
||||
startLock sync.Mutex // Only one log can write to the file
|
||||
|
||||
Level int `json:"level"`
|
||||
Level LogLevel `json:"level"`
|
||||
}
|
||||
|
||||
// an *os.File writer with locker.
|
||||
@@ -132,7 +132,7 @@ func (w *FileLogWriter) docheck(size int) {
|
||||
}
|
||||
|
||||
// write logger message into file.
|
||||
func (w *FileLogWriter) WriteMsg(msg string, skip, level int) error {
|
||||
func (w *FileLogWriter) WriteMsg(msg string, skip int, level LogLevel) error {
|
||||
if level < w.Level {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user