logger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCP_LOGGER     = "GCP_LOGGER"
	DEFAULT_LOGGER = "DEFAULT_LOGGER"
	ASYNC_LOGGER   = "ASYNC_LOGGER"
)
View Source
const (
	RESET   = "\x1b[0m"
	MAGENTA = "\x1b[95m"
	YELLOW  = "\x1b[33m"
	GREEN   = "\x1b[32m"
	CYAN    = "\x1b[96m"
	RED     = "\x1b[31m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncLogger

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

func (*AsyncLogger) Debug

func (obj *AsyncLogger) Debug(log LogInfo)

func (*AsyncLogger) Error

func (obj *AsyncLogger) Error(log LogInfo)

func (*AsyncLogger) Fatal

func (obj *AsyncLogger) Fatal(log LogInfo)

func (*AsyncLogger) Info

func (obj *AsyncLogger) Info(log LogInfo)

func (*AsyncLogger) Init

func (obj *AsyncLogger) Init(log LogProps)

func (*AsyncLogger) SetLogLevel

func (obj *AsyncLogger) SetLogLevel(log LogEnabled)

func (*AsyncLogger) StopLogger

func (obj *AsyncLogger) StopLogger()

func (*AsyncLogger) Warn

func (obj *AsyncLogger) Warn(log LogInfo)

type DefaultLogger

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

func (DefaultLogger) Debug

func (obj DefaultLogger) Debug(log LogInfo)

func (DefaultLogger) Error

func (obj DefaultLogger) Error(log LogInfo)

func (*DefaultLogger) Fatal

func (obj *DefaultLogger) Fatal(log LogInfo)

func (DefaultLogger) Info

func (obj DefaultLogger) Info(log LogInfo)

func (*DefaultLogger) Init

func (obj *DefaultLogger) Init(props LogProps)

func (*DefaultLogger) SetLogLevel

func (obj *DefaultLogger) SetLogLevel(log LogEnabled)

func (DefaultLogger) Warn

func (obj DefaultLogger) Warn(log LogInfo)

type GCPLogger

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

func (GCPLogger) Debug

func (obj GCPLogger) Debug(log LogInfo)

func (GCPLogger) Error

func (obj GCPLogger) Error(log LogInfo)

func (GCPLogger) Fatal

func (obj GCPLogger) Fatal(log LogInfo)

func (GCPLogger) Info

func (obj GCPLogger) Info(log LogInfo)

func (*GCPLogger) Init

func (obj *GCPLogger) Init(props LogProps)

func (*GCPLogger) SetLogLevel

func (obj *GCPLogger) SetLogLevel(log LogEnabled)

func (GCPLogger) Warn

func (obj GCPLogger) Warn(log LogInfo)

type LogEnabled

type LogEnabled struct {
	Warning bool
	Debug   bool
	Info    bool
	Error   bool
}

type LogInfo

type LogInfo struct {
	Key   string
	Value string
	Extra map[string]interface{}
}

type LogProps

type LogProps struct {
	ProjectID      string
	Name           string
	MaxFiles       uint16
	FilePrefix     string
	FileSize       string
	Path           string
	ConsoleEnabled bool
	FileEnabled    bool
	MaxQueue       uint16
	LogEnabled     LogEnabled
}

type Logger

type Logger interface {
	Error(log LogInfo)
	Warn(log LogInfo)
	Info(log LogInfo)
	Fatal(log LogInfo)
	Debug(log LogInfo)
	Init(log LogProps)
	SetLogLevel(log LogEnabled)
}

func New

func New(logger string, props LogProps) Logger

Jump to

Keyboard shortcuts

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