logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: MIT Imports: 13 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCache = errors.New("Invalid Cache")
)

Functions

func Logger

func Logger(ctx context.Context) *logrus.Entry

Types

type DatabaseLogger

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

func NewDatabaseLogger

func NewDatabaseLogger(ctx context.Context) *DatabaseLogger

func (*DatabaseLogger) AddLogEntries

func (p *DatabaseLogger) AddLogEntries(entries []*model.LogEntry) error

func (*DatabaseLogger) Close

func (p *DatabaseLogger) Close()

func (*DatabaseLogger) CreateLogEntry

func (p *DatabaseLogger) CreateLogEntry(timestamp time.Time, app, level string, userID uint64, sessionID string, method, err, msg, data string) *model.LogEntry

type RedisLogger

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

func NewRedisLogger

func NewRedisLogger(ctx context.Context) *RedisLogger

func (*RedisLogger) Grab

func (r *RedisLogger) Grab(ctx context.Context)

Grab entries from redis

func (*RedisLogger) Write

func (r *RedisLogger) Write(entry []byte) (int, error)

Write implements io.Writer interface

Directories

Path Synopsis
cmd
example
simply push log entry to redis
simply push log entry to redis
grabber
Logger grabber fetch entries from redis
Logger grabber fetch entries from redis

Jump to

Keyboard shortcuts

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