logger

package
Version: v0.0.0-...-64e84b0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LOG4G_VERSION = "log4g-v0.99.0"
	LOG4G_MAJOR   = 0
	LOG4G_MINOR   = 99
	LOG4G_PATCH   = 0
)

Variables

View Source
var ErrorStream = os.Stderr
View Source
var OutputStream = os.Stdout

Functions

func InitSentry

func InitSentry(dsn string) error

func SetLogLevel

func SetLogLevel(level Level) (bool, error)

Types

type Level

type Level int
const (
	DEBUG Level = iota
	INFO
	WARNING
	ERROR
	CRITICAL
	FATAL
)

func (Level) Index

func (l Level) Index() int

func (Level) String

func (l Level) String() string

type Logger

type Logger struct {
	Date     time.Time
	Category string
	Level    Level
	Message  string
}

func Category

func Category(category string) *Logger

func (*Logger) Critical

func (l *Logger) Critical(format string, args ...interface{})

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string, args ...interface{})

func (*Logger) Warning

func (l *Logger) Warning(format string, args ...interface{})

Source Files

Jump to

Keyboard shortcuts

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