options

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultLogFile is the default disk location for log files.
	// we use an empty string to indicate log to console
	DefaultLogFile = ""
	// DefaultLogLevel is the default level for logging
	DefaultLogLevel = "INFO"
)

Variables

View Source
var ErrInvalidLogLevel = errors.New("invalid log level")

Functions

This section is empty.

Types

type Options

type Options struct {
	// LogFile provides the filepath to the instances's logfile. Set as empty string to Log to Console
	LogFile string `yaml:"log_file,omitempty"`
	// LogLevel provides the most granular level (e.g., DEBUG, INFO, ERROR) to log
	LogLevel string `yaml:"log_level,omitempty"`
}

Options is a collection of Logging options

func New

func New() *Options

New returns a new Options with default values

func (*Options) Clone

func (o *Options) Clone() *Options

Clone returns a clone of the Options

func (*Options) Initialize

func (o *Options) Initialize(_ string) error

func (*Options) Validate

func (o *Options) Validate() (bool, error)

Jump to

Keyboard shortcuts

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