logparse

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Time       time.Time      `json:"time"`
	Level      string         `json:"level"`
	Message    string         `json:"msg"`
	Additional map[string]any `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

Jump to

Keyboard shortcuts

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