Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
type Logger struct{}
|
||||
|
||||
// Info logs routine messages about cron's operation.
|
||||
func (s *Logger) Info(msg string, keysAndValues ...interface{}) {
|
||||
log.Default().Output(2, msg+" "+fmt.Sprint(keysAndValues...))
|
||||
}
|
||||
|
||||
// Error logs an error condition.
|
||||
func (s *Logger) Error(err error, msg string, keysAndValues ...interface{}) {
|
||||
line := fmt.Sprintf("%s %v %s", msg, err, fmt.Sprint(keysAndValues...))
|
||||
log.Default().Output(2, line)
|
||||
}
|
||||
Reference in New Issue
Block a user