Documentation
¶
Index ¶
- type LogEntry
- type LogEntryFmt
- type LogLevel
- type LogSink
- func (logSink *LogSink) Close()
- func (logSink *LogSink) LogThis(logLevel LogLevel, event interface{}, message string, actor string)
- func (logSink *LogSink) LogThisWithMoreInfo(logLevel LogLevel, event interface{}, message string, actor string, ...)
- func (logSink *LogSink) LogThisWithMoreInfoAndFmt(logLevel LogLevel, event interface{}, message string, actor string, ...)
- func (logSink *LogSink) LogWrite(logEntry *LogEntry)
- func (logSink *LogSink) WriteToConsole() *LogSink
- type LogSinkChannel
- type WriteToConsoleSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogEntryFmt ¶
type LogEntryFmt struct {
NumberOfLinesAfter int
}
type LogLevel ¶
type LogLevel int64
const ( Debug LogLevel = iota Information // Use this for normal logging Warning // Use this for logging that is not an error, but may be a problem Error // Use this for logging that is an error Fatal // Use this for logging that is a fatal error Success // Use this for logging that is a success Failure // Use this for logging that is a failure Critical // Use this for logging that is a critical failure, but can also be a warning )
type LogSink ¶
type LogSink struct {
Channel *LogSinkChannel
WriteToConsoleSettings *WriteToConsoleSettings
// contains filtered or unexported fields
}
func AddPolarisbSystemLog ¶
func AddPolarisbSystemLog() (logSink *LogSink)
AddPolarisbSystemLog initializes the log sink
func (*LogSink) LogThisWithMoreInfo ¶
func (logSink *LogSink) LogThisWithMoreInfo(logLevel LogLevel, event interface{}, message string, actor string, moreInfo map[string]interface{})
LogThisWithMoreInfo builds a log entry with more info
func (*LogSink) LogThisWithMoreInfoAndFmt ¶
func (logSink *LogSink) LogThisWithMoreInfoAndFmt(logLevel LogLevel, event interface{}, message string, actor string, moreInfo map[string]interface{}, entryFmt LogEntryFmt)
LogThisWithMoreInfoAndFmt builds a log entry with more info and fmt information
func (*LogSink) WriteToConsole ¶
WriteToConsole Enables writes to the console
type LogSinkChannel ¶
func (*LogSinkChannel) CloseChannel ¶
func (logSink *LogSinkChannel) CloseChannel()
CloseChannel Close sink channel
type WriteToConsoleSettings ¶
func (*WriteToConsoleSettings) SetWriteToConsoleSettings ¶
func (settings *WriteToConsoleSettings) SetWriteToConsoleSettings(newSettings *WriteToConsoleSettings)
SetWriteToConsoleSettings allows setting write to console settings