Documentation ¶
Overview ¶
Package log provides logging functionality to Trickster
Index ¶
- func Debug(event string, detail Pairs)
- func Error(event string, detail Pairs)
- func ErrorOnce(key string, event string, detail Pairs) bool
- func Fatal(code int, event string, detail Pairs)
- func HasWarnedOnce(key string) bool
- func Info(event string, detail Pairs)
- func InfoOnce(key string, event string, detail Pairs) bool
- func Init()
- func Trace(event string, detail Pairs)
- func Warn(event string, detail Pairs)
- func WarnOnce(key string, event string, detail Pairs) bool
- type Pairs
- type TricksterLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorOnce ¶
ErrorOnce sends an "ERROR" event to the TricksterLogger only once per key Returns true if this invocation was the first, and thus sent to the TricksterLogger
func Fatal ¶
Fatal sends a "FATAL" event to the TricksterLogger and exits the program with the provided exit code
func HasWarnedOnce ¶
HasWarnedOnce returns true if a warning for the key has already been sent to the TricksterLoggerr
func InfoOnce ¶
InfoOnce sends a "INFO" event to the TricksterLogger only once per key. Returns true if this invocation was the first, and thus sent to the TricksterLogger
func Init ¶
func Init()
Init returns a TricksterLogger for the provided logging configuration. The returned TricksterLogger will write to files distinguished from other TricksterLoggers by the instance string.
Types ¶
type Pairs ¶
type Pairs map[string]interface{}
Pairs represents a key=value pair that helps to describe a log event
type TricksterLogger ¶
type TricksterLogger struct {
// contains filtered or unexported fields
}
TricksterLogger is a container for the underlying log provider
var Logger *TricksterLogger
Logger is the handle to the common TricksterLogger
func ConsoleLogger ¶
func ConsoleLogger(logLevel string) *TricksterLogger
ConsoleLogger returns a TricksterLogger object that prints log events to the Console
func (TricksterLogger) Close ¶
func (l TricksterLogger) Close()
Close closes any opened file handles that were used for logging.