Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatForMD ¶
func ZapCoreWrapper ¶
func ZapCoreWrapper(tc *Client, cf *configfile.ConfigFile) func(core zapcore.Core) zapcore.Core
Types ¶
type Client ¶
type Client struct { Logger *log.Logger Chat *telebot.Chat // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, l *log.Logger, cf *configfile.ConfigFile) (*Client, error)
Documentation : https://github.com/tucnak/telebot
func (*Client) CreateHandler ¶
func (c *Client) CreateHandler(endpoint interface{}, handlerFunc telebot.HandlerFunc)
type TelegramZapCore ¶
type TelegramZapCore struct { zapcore.Core TelegramClient *Client ConfigFile *configfile.ConfigFile }
Wrapper around the ZapLogger Core. We just want to catch messages to send them to Telegram, so we forward all the logic to the wrapped Core
func (*TelegramZapCore) Check ¶
func (f *TelegramZapCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry
Check determines whether the supplied Entry should be logged (using the embedded LevelEnabler and possibly some extra logic). If the entry should be logged, the Core adds itself to the CheckedEntry and returns the result.
Callers must use Check before calling Write.
func (*TelegramZapCore) With ¶
func (f *TelegramZapCore) With(fields []zap.Field) zapcore.Core
With adds structured context to the Core.
Click to show internal directories.
Click to hide internal directories.