logger

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MaxStreamRedisQueueSize = 1000
	StreamRedisQueueTTL     = 60
)
View Source
const (
	MaxRedisQueueSize = 1000
)

Variables

This section is empty.

Functions

func ConfigureLogging

func ConfigureLogging(sink *transport.Sink)

ConfigureLogging attachs the correct message handler on top the process manager from the configurations

func IsLoggable

func IsLoggable(defaults []uint16, msg *stream.Message) bool

Types

type ConsoleLogger

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

ConsoleLogger Message message to the console

func (*ConsoleLogger) LogRecord

func (logger *ConsoleLogger) LogRecord(record *LogRecord)

type LogRecord

type LogRecord struct {
	Core    uint16          `json:"core"`
	Command string          `json:"command"`
	Message *stream.Message `json:"message"`
}

type Logger

type Logger interface {
	LogRecord(record *LogRecord)
}

Logger interface

func NewConsoleLogger

func NewConsoleLogger(defaults []uint16) Logger

NewConsoleLogger creates a simple console logger that prints Message messages to Console.

func NewLedisLogger

func NewLedisLogger(sink *transport.Sink, defaults []uint16, size int64) Logger

NewRedisLogger creates new redis logger handler

func NewStreamLogger

func NewStreamLogger(db *transport.Sink, size int64) Logger

NewRedisLogger creates new redis logger handler

type Loggers

type Loggers []Logger
var (
	Current Loggers
)

func (Loggers) LogRecord

func (l Loggers) LogRecord(record *LogRecord)

func (Loggers) Message

func (l Loggers) Message(cmd *pm.Command, msg *stream.Message)

message handler implementation

Jump to

Keyboard shortcuts

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