Documentation ¶
Index ¶
- Constants
- func Debug(entry string)
- func Debugf(entry string, args ...interface{})
- func Error(entry string)
- func Errorf(entry string, args ...interface{})
- func Info(entry string)
- func Infof(entry string, args ...interface{})
- type LogEntry
- type LogEntryType
- type Logger
- type MemoryLogger
- type StdoutLogger
Constants ¶
View Source
const ( LogTypeInfo = "info" LogTypeError = "error" LogTypeDebug = "debug" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogEntry ¶
type LogEntry struct { Timestamp time.Time `json:"ts"` Type LogEntryType `json:"type"` Entry string `json:"log"` }
type LogEntryType ¶
type LogEntryType string
type MemoryLogger ¶ added in v0.12.1
type MemoryLogger struct {
// contains filtered or unexported fields
}
var Memory *MemoryLogger
func (*MemoryLogger) Entries ¶ added in v0.12.1
func (m *MemoryLogger) Entries() []LogEntry
func (*MemoryLogger) WriteEntry ¶ added in v0.12.1
func (m *MemoryLogger) WriteEntry(l LogEntry)
type StdoutLogger ¶ added in v0.12.1
type StdoutLogger struct { }
func (StdoutLogger) WriteEntry ¶ added in v0.12.1
func (m StdoutLogger) WriteEntry(l LogEntry)
Click to show internal directories.
Click to hide internal directories.