Initial commit

This commit is contained in:
2026-05-20 16:13:58 +08:00
commit ceffbe382e
500 changed files with 157469 additions and 0 deletions
+19
View File
@@ -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)
}