log

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Label []string

Functions

func D

func D(args ...interface{})

func E

func E(args ...interface{})

func F

func F(args ...interface{})

func I

func I(args ...interface{})

func P

func P(args ...interface{})

func T

func T(args ...interface{})

func W

func W(args ...interface{})

Types

type HookConfig

type HookConfig struct {
	Key      string
	Host     string
	Password string
	Port     string
}

HookConfig stores configuration needed to setup the hook

type RedisHook

type RedisHook struct {
	RedisClient *redis.Client
	RedisKey    string
}

RedisHook to sends logs to Redis server

func Init

func Init(env interface{}, TLS bool) (*RedisHook, error)

Init with config

func (*RedisHook) Fire

func (hook *RedisHook) Fire(entry *logrus.Entry) error

Fire is called when a log event is fired.

func (*RedisHook) Levels

func (hook *RedisHook) Levels() []logrus.Level

Levels returns the available logging levels.

func (*RedisHook) Shutdown added in v1.0.1

func (hook *RedisHook) Shutdown() error

Jump to

Keyboard shortcuts

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