Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TelegramHook ¶
type TelegramHook struct { AppName string // contains filtered or unexported fields }
TelegramHook to send logs via the Telegram API.
func NewTelegramHook ¶
func NewTelegramHook(appName, authToken string, chatID int) (*TelegramHook, error)
NewTelegramHook creates a new instance of a hook targeting the Telegram API.
func (*TelegramHook) Fire ¶
func (hook *TelegramHook) Fire(entry *logrus.Entry) error
Fire emits a log message to the Telegram API.
func (*TelegramHook) Levels ¶
func (hook *TelegramHook) Levels() []logrus.Level
Levels returns the log levels that the hook should be enabled for.
Click to show internal directories.
Click to hide internal directories.