Documentation ¶
Index ¶
Constants ¶
const SystemErrorTag = "SYSTEM_ERROR"
SystemErrorTag is the identifying name for system errors in the log files
const SystemLogTag = "SYSTEM_LOG_INFO"
SystemLogTag is the identifying name for system messages in the log files
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLogSave ¶
FileLogSave is a logging system that saves log data in a new log file
func (FileLogSave) SaveLogData ¶
func (logSave FileLogSave) SaveLogData(data string)
SaveLogData in FileLogSave will save any logged info/erros into a log file on the local file system
type LogSave ¶
type LogSave interface {
SaveLogData(message string)
}
LogSave is the main system to specify how to save log information
type Logger ¶
type Logger struct {
LogSave LogSave
}
Logger is the main interface struct for different types of loggin
type SystemLogger ¶
type SystemLogger Logger
SystemLogger is log data directly from the underlying running system
func NewSystemLogger ¶
func NewSystemLogger(logSave LogSave) *SystemLogger
NewSystemLogger returns a new logger of type system
func (SystemLogger) Error ¶
func (log SystemLogger) Error(data string) string
Error system log returns error data in the format SYSTEM_ERROR, time, message
func (SystemLogger) Info ¶
func (log SystemLogger) Info(data string) string
Info system log info returns data in the format SYSTEM_LOG_INFO, time, message