changed reciever to a pointer
This commit is contained in:
@@ -7,8 +7,9 @@ import (
|
|||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewLevelLogger(out io.Writer, level LogLevel) LevelLogger {
|
func NewLevelLogger(out io.Writer, level LogLevel) *LevelLogger {
|
||||||
var ll LevelLogger
|
|
||||||
|
ll := &LevelLogger{}
|
||||||
|
|
||||||
ll.CurrentLevel = level
|
ll.CurrentLevel = level
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@ func (ll *LevelLogger) SetLoggingLevel(l int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ll LevelLogger) Blank(n int) {
|
func (ll *LevelLogger) Blank(n int) {
|
||||||
outs := " "
|
outs := " "
|
||||||
if n < 1 {
|
if n < 1 {
|
||||||
n = 1
|
n = 1
|
||||||
@@ -229,7 +230,7 @@ func (ll LevelLogger) Blank(n int) {
|
|||||||
ll.blankLog.Print(outs)
|
ll.blankLog.Print(outs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ll LevelLogger) CheckFerr(e error, msg string) {
|
func (ll *LevelLogger) CheckFerr(e error, msg string) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
ll.Fatal(e, msg)
|
ll.Fatal(e, msg)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user