jlog

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilterScheme

func NewFilterScheme(gen General) (*parse.FilterScheme, error)

func NewInputSchema

func NewInputSchema(in Input) (*parse.InputSchema, error)

func NewOutputFormatter

func NewOutputFormatter(out Output, gen General) (*parse.OutputSchema, error)

func PrintOutputSummary

func PrintOutputSummary(out Output, summary parse.Summary, w io.Writer)

Types

type General

type General struct {
	MatchRegex   string             `short:"g" long:"regex" description:"A regular expression that removes lines from the output that don't match, like grep."`
	NoMatchRegex string             `` /* 126-byte string literal not displayed */
	RegexpScope  *parse.RegexpScope `` /* 179-byte string literal not displayed */
	JQ           string             `` /* 218-byte string literal not displayed */
	JQSearchPath []string           `` //nolint
	/* 340-byte string literal not displayed */
	NoColor      bool   `short:"M" long:"no-color" description:"Disable the use of color." env:"JLOG_FORCE_MONOCHROME"`
	NoMonochrome bool   `short:"c" long:"no-monochrome" description:"Force the use of color." env:"JLOG_FORCE_COLOR"`
	Profile      string `long:"profile" description:"If set, collect a CPU profile and write it to this file."`

	Version bool `short:"v" long:"version" description:"Print version information and exit."`
}

type Input

type Input struct {
	Lax            bool     `` /* 271-byte string literal not displayed */
	LevelKey       string   `long:"levelkey" description:"JSON key that holds the log level." env:"JLOG_LEVEL_KEY"`
	NoLevelKey     bool     `long:"nolevelkey" description:"If set, don't look for a log level, and don't display levels." env:"JLOG_NO_LEVEL_KEY"`
	TimestampKey   string   `long:"timekey" description:"JSON key that holds the log timestamp." env:"JLOG_TIMESTAMP_KEY"`
	NoTimestampKey bool     `long:"notimekey" description:"If set, don't look for a time, and don't display times." env:"JLOG_NO_TIMESTAMP_KEY"`
	MessageKey     string   `long:"messagekey" description:"JSON key that holds the log message." env:"JLOG_MESSAGE_KEY"`
	NoMessageKey   bool     `` /* 148-byte string literal not displayed */
	DeleteKeys     []string `` /* 133-byte string literal not displayed */
	UpgradeKeys    []string `` /* 303-byte string literal not displayed */
}

type Output

type Output struct {
	NoElideDuplicates  bool     `` /* 200-byte string literal not displayed */
	RelativeTimestamps bool     `` /* 159-byte string literal not displayed */
	TimeFormat         string   `` /* 230-byte string literal not displayed */
	OnlySubseconds     bool     `` /* 268-byte string literal not displayed */
	NoSummary          bool     `long:"no-summary" description:"Suppress printing the summary at the end." env:"JLOG_NO_SUMMARY"`
	PriorityFields     []string `long:"priority" short:"p" description:"A list of fields to show first; repeatable." env:"JLOG_PRIORITY_FIELDS" env-delim:","`
	HighlightFields    []string `` //nolint
	/* 199-byte string literal not displayed */

	AfterContext  int `` /* 126-byte string literal not displayed */
	BeforeContext int `` /* 128-byte string literal not displayed */
	Context       int `long:"context" short:"C" default:"0" description:"Print this many context lines around each match (like grep)."`
}

Jump to

Keyboard shortcuts

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