logger

package
v0.0.0-...-320551d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerLogger *log.Logger
View Source
var SessionLogger *log.Entry

Functions

func Debug

func Debug(args ...interface{})

func Error

func Error(args ...interface{})

func Fatal

func Fatal(args ...interface{})

func GetServerLogger

func GetServerLogger() *log.Logger

func GetSessionLogger

func GetSessionLogger() *log.Entry

func GetSessionTraceString

func GetSessionTraceString() string

func Info

func Info(args ...interface{})

func InitContextLogger

func InitContextLogger(config ContextLoggerConfig)

func InitServerLogger

func InitServerLogger(config LoggerConfig)

func InitSessionLogger

func InitSessionLogger(namespace, name, apiVersion, kind, operation string)

func Panic

func Panic(args ...interface{})

func Trace

func Trace(args ...interface{})

func Warn

func Warn(args ...interface{})

func WithFields

func WithFields(fields log.Fields) *log.Entry

Types

type ContextLogger

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

func GetContextLogger

func GetContextLogger() *ContextLogger

func (*ContextLogger) SendLog

func (cxLogger *ContextLogger) SendLog(logBytes []byte)

type ContextLoggerConfig

type ContextLoggerConfig struct {
	Enabled   bool
	File      string
	LimitSize int64
}

type LoggerConfig

type LoggerConfig struct {
	Level    string
	Format   string
	FileDest string
}

type SessionTraceHook

type SessionTraceHook struct {
	// contains filtered or unexported fields
}
var SessionTrace *SessionTraceHook

func NewSessionTraceHook

func NewSessionTraceHook(minLevel logrus.Level, formatter logrus.Formatter) *SessionTraceHook

func (*SessionTraceHook) Fire

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

func (*SessionTraceHook) GetBufferedString

func (hook *SessionTraceHook) GetBufferedString() string

func (*SessionTraceHook) Levels

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

func (*SessionTraceHook) Reset

func (hook *SessionTraceHook) Reset()

Jump to

Keyboard shortcuts

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