func (hook *TelegramHook) Fire(entry *logrus.Entry) error {
	msg := hook.createMessage(entry)

	if hook.async {
		go hook.sendMessage(msg)
		return nil
	}

	err := hook.sendMessage(msg)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Unable to send message, %v", err)
		return err
	}

	return nil
}
// Fire emits a log message to the Telegram API.
Fire emits a log message to the Telegram API.
// Fire emits a log message to the Telegram API .
func (hook *TelegramHook) Fire(entry *logrus.Entry) error {
	msg := hook.createMessage(entry)
	if hook.async {
		go hook.sendMessage(msg)
		return nil
	}
	err := hook.sendMessage(msg)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Unable to send message, %v", err)
		return err
	}
	return nil
}
func ( hook * TelegramHook ) Fire ( entry * logrus . Entry ) error { msg := hook . createMessage ( entry ) if hook . async { go hook . sendMessage ( msg ) return nil } err := hook . sendMessage ( msg ) if err != nil { fmt . Fprintf ( os . Stderr , " " , err ) return err } return nil }
Fire emits a log message to the Telegram API.
Fire emits a log message to the Telegram API .