2018-08-06 23:15:37 +02:00
|
|
|
package tgbotapi
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
stdlog "log"
|
2018-09-22 03:20:28 +02:00
|
|
|
"os"
|
2018-08-06 23:15:37 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var log = stdlog.New(os.Stderr, "", stdlog.LstdFlags)
|
|
|
|
|
2018-09-22 03:20:28 +02:00
|
|
|
// SetLogger specifies the logger that the package should use.
|
2018-08-06 23:15:37 +02:00
|
|
|
func SetLogger(newLog *stdlog.Logger) error {
|
|
|
|
if newLog == nil {
|
|
|
|
return errors.New("logger is nil")
|
|
|
|
}
|
|
|
|
log = newLog
|
|
|
|
return nil
|
|
|
|
}
|