logformat

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logformat contains different implementations of log formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DmesgOutput

type DmesgOutput struct {
	// contains filtered or unexported fields
}

DmesgOutput is used to print logs in dmesg format.

func NewDmesgOutput

func NewDmesgOutput(rdr io.Reader) *DmesgOutput

NewDmesgOutput returns a new DmesgOutput.

func (DmesgOutput) Run

func (o DmesgOutput) Run(ctx context.Context) error

Run parses logs from passed reader and prints them in dmesg format until the context is canceled or the reader has returned an error.

type OmniOutput

type OmniOutput struct {
	// contains filtered or unexported fields
}

OmniOutput is a log output which parses logs from Talos machine and prints them in zap'like format.

func NewOmniOutput

func NewOmniOutput(rdr io.Reader) *OmniOutput

NewOmniOutput returns a new OmniOutput.

func (*OmniOutput) Run

func (o *OmniOutput) Run(ctx context.Context) error

Run prints logs from passed reader until the context is canceled or the reader has returned an error.

type RawOutput

type RawOutput struct {
	// contains filtered or unexported fields
}

RawOutput simply copies the input rdr to os.Stdout.

func NewRawOutput

func NewRawOutput(rdr io.Reader) *RawOutput

NewRawOutput runs the raw log format.

func (RawOutput) Run

func (o RawOutput) Run() error

Run copies the input rdr to os.Stdout the rdr has returned an error.

Jump to

Keyboard shortcuts

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