Documentation ¶
Index ¶
- Constants
- func SeverityToString(s factorlog.Severity) string
- type LogMessage
- func NewDebugLogMessage(source, message string) *LogMessage
- func NewErrorLogMessage(source, message string) *LogMessage
- func NewInfoLogMessage(source, message string) *LogMessage
- func NewLogMessage(source, message string, level factorlog.Severity) *LogMessage
- func NewWarnLogMessage(source, message string) *LogMessage
- type Server
Constants ¶
View Source
const TableName = "logs"
TableName is the name of the table within influxdb
Variables ¶
This section is empty.
Functions ¶
func SeverityToString ¶
SeverityToString converts the Severity to human readable string
Types ¶
type LogMessage ¶
type LogMessage struct { Timestamp time.Time Source string Severity factorlog.Severity Message string Event Event.Event }
LogMessage represents a single Message which can be send over network
func NewDebugLogMessage ¶
func NewDebugLogMessage(source, message string) *LogMessage
NewDebugLogMessage constructs a new LogMessage with level debug
func NewErrorLogMessage ¶
func NewErrorLogMessage(source, message string) *LogMessage
NewErrorLogMessage constructs a new LogMessage with level error
func NewInfoLogMessage ¶
func NewInfoLogMessage(source, message string) *LogMessage
NewInfoLogMessage constructs a new LogMessage with level info
func NewLogMessage ¶
func NewLogMessage(source, message string, level factorlog.Severity) *LogMessage
NewLogMessage constructs a new LogMessage
func NewWarnLogMessage ¶
func NewWarnLogMessage(source, message string) *LogMessage
NewWarnLogMessage constructs a new LogMessage with level warn
func (*LogMessage) String ¶
func (message *LogMessage) String() string
String prints the message human readable
type Server ¶
type Server struct { LogQueue chan LogMessage InfluxClient client.Client // contains filtered or unexported fields }
Server receives LogMessages and does something with them
Click to show internal directories.
Click to hide internal directories.