Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LazyLogEntries ¶ added in v0.4.0
type LazyLogEntries []LazyLogEntry
LazyLogEntries is a helper type definition for the slice of lazy log entries.
func LoadLogsFromFile ¶
func LoadLogsFromFile( path string, cfg *config.Config, ) (_ LazyLogEntries, err error)
LoadLogsFromFile loads json log entries from file.
func ParseLogEntriesFromReader ¶ added in v0.4.0
func (LazyLogEntries) Filter ¶ added in v0.4.0
func (entries LazyLogEntries) Filter(term string) LazyLogEntries
Filter filters entries by ignore case exact match.
func (LazyLogEntries) Reverse ¶ added in v0.4.0
func (entries LazyLogEntries) Reverse() LazyLogEntries
Reverse all entries.
type LazyLogEntry ¶ added in v0.4.0
type LazyLogEntry struct {
Line json.RawMessage
}
LazyLogEntry holds unredenred LogEntry. Use `LogEntry` getter.
type Level ¶
type Level string
Level of the logs entity.
const ( LevelUnknown Level = "none" LevelTrace Level = "trace" LevelDebug Level = "debug" LevelInfo Level = "info" LevelWarning Level = "warn" LevelError Level = "error" LevelPanic Level = "panic" LevelFatal Level = "fatal" )
Possible log levels.
func ParseLevel ¶ added in v0.1.1
ParseLevel parses level from the text value.
nolint: cyclop // Switch-case.
type LogEntry ¶
type LogEntry struct { Fields []string Line json.RawMessage }
LogEntry is a single partly-parse record of the log.
func ParseLogEntry ¶
func ParseLogEntry( line json.RawMessage, cfg *config.Config, ) LogEntry
ParseLogEntry parses a single log entry from the json line.
Click to show internal directories.
Click to hide internal directories.