Documentation
¶
Index ¶
- Constants
- func RandomSessionID() string
- type AppLogger
- func (al AppLogger) FinishLogging() []error
- 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() []error
- type SimpleChannel
- func (sc SimpleChannel) Close() error
- func (sc SimpleChannel) GetDetails() string
- func (sc SimpleChannel) GetLog() kitlog.Logger
- func (sc SimpleChannel) GetLogLevel() kitlevel.Option
- func (sc SimpleChannel) GetSessionID() string
- func (sc SimpleChannel) Open() (sli.ISimpleChannel, error)
- func (sc SimpleChannel) SetLog(log kitlog.Logger)
- func (sc SimpleChannel) SetLogLevel(lvl kitlevel.Option)
- func (sc 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() []error
- func (ssl SimpleLogger) CloseChannel(sessionid string) []error
- 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() []error
- func (ssl SimpleLogger) OpenChannel(sessionid string) []error
- func (ssl SimpleLogger) OpenSessionFileLog(logfilename string, sessionid string) error
- func (ssl SimpleLogger) PrintDetails()
- func (ssl SimpleLogger) SetChannelLogLevel(sessionid string, lvl kitlevel.Option)
- func (ssl SimpleLogger) SetLogLevel(lvl kitlevel.Option)
- func (ssl SimpleLogger) SetPrintToScreen(toggle sli.PrintLevel)
- type SimpleOutput
Constants ¶
const ( LOG_EXTENSION = ".log" CMD_STRING = "cmd" DATA_STRING = "data" CASE_DEBUG = "debug" CASE_WARN = "warn" CASE_INFO = "info" CASE_ERROR = "error" CASE_DEBUGF = "debugf" CASE_WARNF = "warnf" CASE_INFOF = "infof" CASE_ERRORF = "errorf" )
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 ¶
the logging functions are here
func (AppLogger) LogErrorEf ¶
This Log error allows errors to be logged .Error() is the data written
func (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 (sc SimpleChannel) Close() error
func (SimpleChannel) GetDetails ¶
func (sc SimpleChannel) GetDetails() string
func (SimpleChannel) GetLog ¶
func (sc SimpleChannel) GetLog() kitlog.Logger
func (SimpleChannel) GetLogLevel ¶
func (sc SimpleChannel) GetLogLevel() kitlevel.Option
func (SimpleChannel) GetSessionID ¶
func (sc SimpleChannel) GetSessionID() string
func (SimpleChannel) Open ¶
func (sc SimpleChannel) Open() (sli.ISimpleChannel, error)
func (SimpleChannel) SetLog ¶
func (sc SimpleChannel) SetLog(log kitlog.Logger)
func (SimpleChannel) SetLogLevel ¶
func (sc SimpleChannel) SetLogLevel(lvl kitlevel.Option)
func (SimpleChannel) SetSessionID ¶
func (sc 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() []error
func (SimpleLogger) CloseChannel ¶
func (ssl SimpleLogger) CloseChannel(sessionid string) []error
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() []error
func (SimpleLogger) OpenChannel ¶
func (ssl SimpleLogger) OpenChannel(sessionid string) []error
func (SimpleLogger) OpenSessionFileLog ¶
func (ssl SimpleLogger) OpenSessionFileLog(logfilename string, sessionid string) error
func (SimpleLogger) PrintDetails ¶
func (ssl SimpleLogger) PrintDetails()
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)
type SimpleOutput ¶
type SimpleOutput struct {
//inherit from interface
sli.ISimpleOutput
// contains filtered or unexported fields
}
Simple Output represents an output to be logged to
func (SimpleOutput) Close ¶
func (so SimpleOutput) Close() error
func (SimpleOutput) GetDetails ¶
func (so SimpleOutput) GetDetails() string
func (SimpleOutput) GetSessionID ¶
func (so SimpleOutput) GetSessionID() string
func (SimpleOutput) Open ¶
func (so SimpleOutput) Open() (sli.ISimpleOutput, error)