clilog

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package clilog provides a fluent API for configuring structured logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Filter      []string
	Human       string
	JSON        string
	Stackdriver string
	Trace       bool
	Verbose     bool
}

func New

func New(opts ...Option) *Builder

func (*Builder) Build

func (b *Builder) Build(inv *serpent.Invocation) (log slog.Logger, closeLog func(), err error)

type Option

type Option func(*Builder)

func FromDeploymentValues

func FromDeploymentValues(vals *codersdk.DeploymentValues) Option

func WithFilter

func WithFilter(filters ...string) Option

func WithHuman

func WithHuman(loc string) Option

func WithJSON

func WithJSON(loc string) Option

func WithStackdriver

func WithStackdriver(loc string) Option

func WithTrace

func WithTrace() Option

func WithVerbose

func WithVerbose() Option

Jump to

Keyboard shortcuts

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