logfmt

package
v0.0.0-...-203b1ee Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogfmtCmd

func NewLogfmtCmd() *cobra.Command

func RunCmdLine

func RunCmdLine()

func RunLogfmt

func RunLogfmt(opts *Options, args []string)

Types

type Line

type Line struct {
	Text string
}

type Options

type Options struct {
	ShowFields        flagValueForShow
	ShowLevels        flagValueForLevel
	OnlyHostname      string
	OnlyPid           string
	OnlyService       string
	OnlyInternal      bool
	FollowTail        bool
	DequoteNewlines   bool
	TruncateService   bool
	TruncateComponent bool
	ComponentFilter   regexFlag
	MessageFilter     regexFlag
	Format            OutputFormat
}

func NewOptions

func NewOptions() (ret Options)

type OutputFormat

type OutputFormat int
const (
	FormatVespa OutputFormat = iota //default is vespa
	FormatRaw
	FormatJSON
)

func (*OutputFormat) Set

func (v *OutputFormat) Set(val string) error

func (*OutputFormat) String

func (v *OutputFormat) String() string

func (*OutputFormat) Type

func (v *OutputFormat) Type() string

type Tail

type Tail interface {
	Lines() chan Line
}

func FollowFile

func FollowFile(fn string) (Tail, error)

Jump to

Keyboard shortcuts

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