simplelogger

package
v0.0.0-...-c5004ea Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomSessionID

func RandomSessionID() string

Generates Random session string

Types

type AppLogger

type AppLogger struct {

	//inherit from interface
	sli.IAppLogger

	Log     sli.ISimpleLogger `json:"-"`
	Started bool              `json:"-"`
}

func (*AppLogger) FinishLogging

func (al *AppLogger) FinishLogging()

the logging functions are here

func (*AppLogger) LogDebug

func (al *AppLogger) LogDebug(cmd string, data ...interface{})

the logging functions are here

func (*AppLogger) LogDebugf

func (al *AppLogger) LogDebugf(cmd string, msg string, data ...interface{})

the logging functions are here

func (*AppLogger) LogError

func (al *AppLogger) LogError(cmd string, data ...interface{})

func (*AppLogger) LogErrorE

func (al *AppLogger) LogErrorE(cmd string, data error)

This Log error allows errors to be logged .Error() is the data written

func (*AppLogger) LogErrorEf

func (al *AppLogger) LogErrorEf(cmd string, msg string, e error)

This Log error allows errors to be logged .Error() is the data written

func (*AppLogger) LogErrorf

func (al *AppLogger) LogErrorf(cmd string, msg string, data ...interface{})

func (*AppLogger) LogInfo

func (al *AppLogger) LogInfo(cmd string, data ...interface{})

func (*AppLogger) LogInfof

func (al *AppLogger) LogInfof(cmd string, msg string, data ...interface{})

func (*AppLogger) LogWarn

func (al *AppLogger) LogWarn(cmd string, data ...interface{})

func (*AppLogger) LogWarnf

func (al *AppLogger) LogWarnf(cmd string, msg string, data ...interface{})

func (*AppLogger) StartLogging

func (al *AppLogger) StartLogging()

the logging functions are here

type SimpleChannel

type SimpleChannel struct {

	//inherit from interface
	sli.ISimpleChannel
	// contains filtered or unexported fields
}

Simple Channel represents and output channel to be logged to kitlog does the hard work this simply wraps

func (*SimpleChannel) Close

func (lo *SimpleChannel) Close()

func (*SimpleChannel) GetFileName

func (lo *SimpleChannel) GetFileName() string

func (*SimpleChannel) GetLog

func (lo *SimpleChannel) GetLog() kitlog.Logger

func (*SimpleChannel) GetLogLevel

func (lo *SimpleChannel) GetLogLevel() kitlevel.Option

func (*SimpleChannel) GetSessionID

func (lo *SimpleChannel) GetSessionID() string

func (*SimpleChannel) Open

func (lo *SimpleChannel) Open()

func (*SimpleChannel) SetFileName

func (lo *SimpleChannel) SetFileName(filename string)

func (*SimpleChannel) SetLog

func (lo *SimpleChannel) SetLog(log kitlog.Logger)

func (*SimpleChannel) SetLogLevel

func (lo *SimpleChannel) SetLogLevel(lvl kitlevel.Option)

func (*SimpleChannel) SetSessionID

func (lo *SimpleChannel) SetSessionID(sessionid string)

type SimpleLogger

type SimpleLogger struct {

	//inherit from interface
	sli.ISimpleLogger
	// contains filtered or unexported fields
}

func NewAppSessionDayLogger

func NewAppSessionDayLogger(sessionid string) *SimpleLogger

func NewAppSessionNowLogger

func NewAppSessionNowLogger(sessionid string) *SimpleLogger

func NewApplicationDayLogger

func NewApplicationDayLogger() *SimpleLogger

func NewApplicationLogger

func NewApplicationLogger() *SimpleLogger

This is the simplest application log generator The os.args[0] is used for filename and the session is random

func NewApplicationNowLogger

func NewApplicationNowLogger() *SimpleLogger

func NewApplicationSessionLogger

func NewApplicationSessionLogger(sessionid string) *SimpleLogger

This is application log generator when the session is required The os.args[0] is used for filename

func NewSimpleLogger

func NewSimpleLogger(filename string, sessionid string) *SimpleLogger

This lets you specify the filename and the session

func (*SimpleLogger) AddChannel

func (ssl *SimpleLogger) AddChannel(log sli.ISimpleChannel)

func (*SimpleLogger) CloseAllChannels

func (ssl *SimpleLogger) CloseAllChannels()

func (*SimpleLogger) CloseChannel

func (ssl *SimpleLogger) CloseChannel(sessionid string)

func (*SimpleLogger) GetChannel

func (ssl *SimpleLogger) GetChannel(sessionid string) sli.ISimpleChannel

func (*SimpleLogger) GetChannelLogLevel

func (ssl *SimpleLogger) GetChannelLogLevel(sessionid string) kitlevel.Option

func (*SimpleLogger) GetChannels

func (ssl *SimpleLogger) GetChannels() map[string]sli.ISimpleChannel

func (*SimpleLogger) GetLogLevel

func (ssl *SimpleLogger) GetLogLevel() kitlevel.Option

func (*SimpleLogger) GetPrintToScreen

func (ssl *SimpleLogger) GetPrintToScreen() sli.PrintLevel

func (*SimpleLogger) GetSessionIDs

func (ssl *SimpleLogger) GetSessionIDs() []string

func (*SimpleLogger) LogDebug

func (ssl *SimpleLogger) LogDebug(cmd string, data ...interface{})

the logging functions are here

func (*SimpleLogger) LogDebugf

func (ssl *SimpleLogger) LogDebugf(cmd string, msg string, data ...interface{})

the logging functions are here

func (*SimpleLogger) LogError

func (ssl *SimpleLogger) LogError(cmd string, data ...interface{})

func (*SimpleLogger) LogErrorE

func (ssl *SimpleLogger) LogErrorE(cmd string, e error)

This Log error allows errors to be logged .Error() is the data written

func (*SimpleLogger) LogErrorEf

func (ssl *SimpleLogger) LogErrorEf(cmd string, msg string, e error)

This Log error allows errors to be logged where .Error() will be passed into the string

func (*SimpleLogger) LogErrorf

func (ssl *SimpleLogger) LogErrorf(cmd string, msg string, data ...interface{})

func (*SimpleLogger) LogInfo

func (ssl *SimpleLogger) LogInfo(cmd string, data ...interface{})

func (*SimpleLogger) LogInfof

func (ssl *SimpleLogger) LogInfof(cmd string, msg string, data ...interface{})

func (*SimpleLogger) LogWarn

func (ssl *SimpleLogger) LogWarn(cmd string, data ...interface{})

func (*SimpleLogger) LogWarnf

func (ssl *SimpleLogger) LogWarnf(cmd string, msg string, data ...interface{})

func (*SimpleLogger) OpenAllChannels

func (ssl *SimpleLogger) OpenAllChannels()

func (*SimpleLogger) OpenChannel

func (ssl *SimpleLogger) OpenChannel(sessionid string)

func (*SimpleLogger) OpenSessionFileLog

func (ssl *SimpleLogger) OpenSessionFileLog(logfilename string, sessionid string)

func (*SimpleLogger) SetChannelLogLevel

func (ssl *SimpleLogger) SetChannelLogLevel(sessionid string, lvl kitlevel.Option)

func (*SimpleLogger) SetLogLevel

func (ssl *SimpleLogger) SetLogLevel(lvl kitlevel.Option)

func (*SimpleLogger) SetPrintToScreen

func (ssl *SimpleLogger) SetPrintToScreen(toggle sli.PrintLevel)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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