29 lines
490 B
Go
Executable File
29 lines
490 B
Go
Executable File
package logger
|
|
|
|
import (
|
|
"gogs.inhome.blapointe.com/local/logb"
|
|
)
|
|
|
|
type Logger struct{}
|
|
|
|
func New() Logger {
|
|
return Logger{}
|
|
}
|
|
|
|
func (l Logger) Info(m string, args ...interface{}) {
|
|
args = append([]interface{}{m}, args...)
|
|
switch m {
|
|
case "wake", "result":
|
|
logb.Verbose(args...)
|
|
case "run":
|
|
logb.Debug(args...)
|
|
default:
|
|
logb.Info(args...)
|
|
}
|
|
}
|
|
|
|
func (l Logger) Error(e error, m string, args ...interface{}) {
|
|
args = append([]interface{}{e, m}, args...)
|
|
logb.Error(args...)
|
|
}
|