all repos — telegram-bot-api @ 0343f9ec270a847ed4d276e3ba2ce88e7b1282b9

Golang bindings for the Telegram Bot API

log.go (view raw)

 1package tgbotapi
 2
 3import (
 4	"os"
 5	"errors"
 6	stdlog "log"
 7)
 8
 9var log = stdlog.New(os.Stderr, "", stdlog.LstdFlags)
10
11func SetLogger(newLog *stdlog.Logger) error {
12	if newLog == nil {
13		return errors.New("logger is nil")
14	}
15	log = newLog
16	return nil
17}