logparse

package
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stringify added in v0.11.0

func Stringify(v any) (string, bool)

Types

type LogEntry

type LogEntry struct {
	Time       time.Time                `json:"time"`
	Level      string                   `json:"level"`
	Message    string                   `json:"msg"`
	Additional []LogEntryAdditionalProp `json:"-"`
}

func ParseDefaultLog

func ParseDefaultLog(reader io.Reader) (LogEntry, error)

func ParseLog

func ParseLog(log string) LogEntry

func ParseSlogJSON

func ParseSlogJSON(reader io.Reader) (LogEntry, error)

func ParseSlogText

func ParseSlogText(reader io.Reader) (LogEntry, error)

func (*LogEntry) UnmarshalJSON

func (se *LogEntry) UnmarshalJSON(data []byte) error

TODO: remove this once json/v2 is GA

type LogEntryAdditionalProp added in v0.11.0

type LogEntryAdditionalProp struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL