ghost-listmonk-connector/utils/logger.go
troneras 1fd7dad8e4 # This is a combination of 2 commits.
# This is the 1st commit message:

first commit

# This is the commit message #2:

fixed cache
2024-08-21 02:08:01 +02:00

28 lines
493 B
Go

package utils
import (
"log"
"os"
)
type Logger struct {
*log.Logger
}
var (
InfoLogger *Logger
ErrorLogger *Logger
)
func init() {
InfoLogger = &Logger{log.New(os.Stdout, "INFO: ", log.Ldate|log.Ltime|log.Lshortfile)}
ErrorLogger = &Logger{log.New(os.Stderr, "ERROR: ", log.Ldate|log.Ltime|log.Lshortfile)}
}
func (l *Logger) Infof(format string, v ...interface{}) {
l.Printf(format, v...)
}
func (l *Logger) Errorf(format string, v ...interface{}) {
l.Printf(format, v...)
}