cmdlogger

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options Options) *debuglogger.Logger

New will create a debuglogger.Logger with the specified options.

func SetDatestampsDefault

func SetDatestampsDefault(defaultValue bool)

SetDatestampsDefault will change the default for the -logDatestamps command line flag. This should be called before flag.Parse().

Types

type Options

type Options struct {
	Datestamps bool
	DebugLevel int // Supported range: -1 to 65535.
	Subseconds bool
	Writer     io.Writer
}

func GetStandardOptions

func GetStandardOptions() Options

GetStandardOptions will return the standard options. The following command-line flags are registered and used:

 -logDatestamps: if true, prefix logs with datestamps
 -logDebugLevel: debug log level
 -logSubseconds: if true, datestamps will have subsecond resolution
The standard error is used for the output.

Jump to

Keyboard shortcuts

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