lmslogging

package
v0.0.0-...-8886d92 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LmsLogging

type LmsLogging struct {
	SysLog *zerolog.Logger
	AppLog *zerolog.Logger
}

func (*LmsLogging) LogWriter

func (l *LmsLogging) LogWriter(logs <-chan Log)

LogWriter writes the log to the file Log receives from Log channel

func (LmsLogging) NewAppFileLog

func (l LmsLogging) NewAppFileLog(fName string) (*LmsLogging, error)

NewAppFileLog initialise and return LmsLogging

func (LmsLogging) NewSysAndAppFileLog

func (l LmsLogging) NewSysAndAppFileLog(sysLog, AppLog string) (*LmsLogging, *os.File, *os.File, error)

NewSysAndAppFileLog initialise and return LmsLogging

func (LmsLogging) NewSysFileLog

func (l LmsLogging) NewSysFileLog(fName string) (*LmsLogging, error)

NewSysFileLog initialise and return LmsLogging

type Log

type Log struct {
	SysLog   bool
	Severity Severity
	Prefix   string
	Message  string
}

type Severity

type Severity int
const (
	Debug Severity = iota
	Info
	Warn
	Error
	Fatal
)

Jump to

Keyboard shortcuts

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