Documentation ¶
Index ¶
- func RandomSessionID() string
- type AppLogger
- func (al *AppLogger) FinishLogging()
- func (al *AppLogger) LogDebug(cmd string, data ...interface{})
- func (al *AppLogger) LogDebugf(cmd string, msg string, data ...interface{})
- func (al *AppLogger) LogError(cmd string, data ...interface{})
- func (al *AppLogger) LogErrorE(cmd string, data error)
- func (al *AppLogger) LogErrorEf(cmd string, msg string, e error)
- func (al *AppLogger) LogErrorf(cmd string, msg string, data ...interface{})
- func (al *AppLogger) LogInfo(cmd string, data ...interface{})
- func (al *AppLogger) LogInfof(cmd string, msg string, data ...interface{})
- func (al *AppLogger) LogWarn(cmd string, data ...interface{})
- func (al *AppLogger) LogWarnf(cmd string, msg string, data ...interface{})
- func (al *AppLogger) StartLogging()
- type SimpleChannel
- func (lo *SimpleChannel) Close()
- func (lo *SimpleChannel) GetFileName() string
- func (lo *SimpleChannel) GetLog() kitlog.Logger
- func (lo *SimpleChannel) GetLogLevel() kitlevel.Option
- func (lo *SimpleChannel) GetSessionID() string
- func (lo *SimpleChannel) Open()
- func (lo *SimpleChannel) SetFileName(filename string)
- func (lo *SimpleChannel) SetLog(log kitlog.Logger)
- func (lo *SimpleChannel) SetLogLevel(lvl kitlevel.Option)
- func (lo *SimpleChannel) SetSessionID(sessionid string)
- type SimpleLogger
- func NewAppSessionDayLogger(sessionid string) *SimpleLogger
- func NewAppSessionNowLogger(sessionid string) *SimpleLogger
- func NewApplicationDayLogger() *SimpleLogger
- func NewApplicationLogger() *SimpleLogger
- func NewApplicationNowLogger() *SimpleLogger
- func NewApplicationSessionLogger(sessionid string) *SimpleLogger
- func NewSimpleLogger(filename string, sessionid string) *SimpleLogger
- func (ssl *SimpleLogger) AddChannel(log sli.ISimpleChannel)
- func (ssl *SimpleLogger) CloseAllChannels()
- func (ssl *SimpleLogger) CloseChannel(sessionid string)
- func (ssl *SimpleLogger) GetChannel(sessionid string) sli.ISimpleChannel
- func (ssl *SimpleLogger) GetChannelLogLevel(sessionid string) kitlevel.Option
- func (ssl *SimpleLogger) GetChannels() map[string]sli.ISimpleChannel
- func (ssl *SimpleLogger) GetLogLevel() kitlevel.Option
- func (ssl *SimpleLogger) GetPrintToScreen() sli.PrintLevel
- func (ssl *SimpleLogger) GetSessionIDs() []string
- func (ssl *SimpleLogger) LogDebug(cmd string, data ...interface{})
- func (ssl *SimpleLogger) LogDebugf(cmd string, msg string, data ...interface{})
- func (ssl *SimpleLogger) LogError(cmd string, data ...interface{})
- func (ssl *SimpleLogger) LogErrorE(cmd string, e error)
- func (ssl *SimpleLogger) LogErrorEf(cmd string, msg string, e error)
- func (ssl *SimpleLogger) LogErrorf(cmd string, msg string, data ...interface{})
- func (ssl *SimpleLogger) LogInfo(cmd string, data ...interface{})
- func (ssl *SimpleLogger) LogInfof(cmd string, msg string, data ...interface{})
- func (ssl *SimpleLogger) LogWarn(cmd string, data ...interface{})
- func (ssl *SimpleLogger) LogWarnf(cmd string, msg string, data ...interface{})
- func (ssl *SimpleLogger) OpenAllChannels()
- func (ssl *SimpleLogger) OpenChannel(sessionid string)
- func (ssl *SimpleLogger) OpenSessionFileLog(logfilename string, sessionid string)
- func (ssl *SimpleLogger) SetChannelLogLevel(sessionid string, lvl kitlevel.Option)
- func (ssl *SimpleLogger) SetLogLevel(lvl kitlevel.Option)
- func (ssl *SimpleLogger) SetPrintToScreen(toggle sli.PrintLevel)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) LogErrorE ¶
This Log error allows errors to be logged .Error() is the data written
func (*AppLogger) LogErrorEf ¶
This Log error allows errors to be logged .Error() is the data written
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)