Files
2026-05-20 16:13:58 +08:00

20 lines
465 B
Go

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)
}