logs

package
v0.0.0-...-f2c360d Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareLevels

func CompareLevels(as, bs string) int32

func FlatJsonLogLineParser

func FlatJsonLogLineParser(input string) (map[string]string, error)

FlatJsonLogLineParser parses a flat JSON log line into a map of string keys and values. Handles based on the documentation at https://pkg.go.dev/encoding/json#Unmarshal

func LevelToString

func LevelToString(level LogLevel) string

Types

type LogEntry

type LogEntry struct {
	Timestamp time.Time
	Message   string
	Raw       string
	Level     LogLevel
	Fields    map[string]string
}

type LogLevel

type LogLevel int32
const (
	LevelDebug LogLevel = 0
	LevelInfo  LogLevel = 1
	LevelWarn  LogLevel = 2
	LevelError LogLevel = 3
)

func StringToLevel

func StringToLevel(name string) LogLevel

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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