telegram-bot-api/log.go

18 lines
249 B
Go
Raw Normal View History

2018-08-06 23:15:37 +02:00
package tgbotapi
import (
"os"
"errors"
stdlog "log"
)
var log = stdlog.New(os.Stderr, "", stdlog.LstdFlags)
func SetLogger(newLog *stdlog.Logger) error {
if newLog == nil {
return errors.New("logger is nil")
}
log = newLog
return nil
}