botlogs

package
v0.0.0-...-b745f0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger struct to log updates of telegram bot

func NewLogger

func NewLogger(dirPath string) *Logger

NewLogger creates logger object, dirPath - logs directory. If dirPath is not directory - creates default logs directory in root path

func (*Logger) MessageLog

func (l *Logger) MessageLog(from *tgbotapi.User, text string) error

MessageLog build log to file with name logger.dirPath + [date] + .log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL