formatter

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	UseColors bool
}

func NewCLI

func NewCLI(useColors bool) *CLI

func (*CLI) Format

func (c *CLI) Format(event *LogEvent) ([]byte, error)

type Formatter

type Formatter interface {
	Format(event *LogEvent) ([]byte, error)
}

type JSON

type JSON struct{}

func (*JSON) Format

func (j *JSON) Format(event *LogEvent) ([]byte, error)

type LogEvent

type LogEvent struct {
	Message  string
	Level    levels.Level
	Metadata map[string]string
}

Jump to

Keyboard shortcuts

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