verbosity

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package verbosity is a plugin of launchr to configure log level of the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger added in v0.21.0

func NewLogger(logFormat LogFormat, logLevel launchr.LogLevel, out *launchr.Out) *launchr.Logger

NewLogger creates and initializes a new logger with the specified format, log level, and output stream.

Types

type LogFormat added in v0.16.0

type LogFormat string

LogFormat is a enum type for log output format.

const (
	LogFormatPretty LogFormat = "pretty" // LogFormatPretty is a default logger output format.
	LogFormatPlain  LogFormat = "plain"  // LogFormatPlain is a plain logger output format.
	LogFormatJSON   LogFormat = "json"   // LogFormatJSON is a json logger output format.
)

Log formats.

func (*LogFormat) Set added in v0.16.0

func (e *LogFormat) Set(v string) error

Set implements github.com/spf13/pflag.Value interface.

func (*LogFormat) String added in v0.16.0

func (e *LogFormat) String() string

Set implements fmt.Stringer interface.

func (*LogFormat) Type added in v0.16.0

func (e *LogFormat) Type() string

Type implements github.com/spf13/pflag.Value interface.

type Plugin

type Plugin struct{}

Plugin is launchr.Plugin to set verbosity of the application.

func (Plugin) OnAppInit added in v0.16.0

func (p Plugin) OnAppInit(app launchr.App) error

OnAppInit implements launchr.OnAppInitPlugin interface.

func (Plugin) PluginInfo

func (p Plugin) PluginInfo() launchr.PluginInfo

PluginInfo implements launchr.Plugin interface.

Jump to

Keyboard shortcuts

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