log

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdFromContext

func CmdFromContext(ctx context.Context) (string, bool)

CmdFromContext returns the program name value from the provided Context.

func DebugFromContext

func DebugFromContext(ctx context.Context) bool

DebugFromContext returns if debug is enabled in the provided Context.

func NewCmdContext

func NewCmdContext(ctx context.Context, debug bool) context.Context

NewCmdContext returns a new Context with program name, process id, and debug values.

func PidFromContext

func PidFromContext(ctx context.Context) (int, bool)

PidFromContext returns the process ID value from the provided Context.

Types

type CmdLogger

type CmdLogger struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context) *CmdLogger

func (*CmdLogger) Debug

func (cl *CmdLogger) Debug(v ...interface{})

func (*CmdLogger) Debugf

func (cl *CmdLogger) Debugf(format string, v ...interface{})

func (*CmdLogger) Debugln

func (cl *CmdLogger) Debugln(v ...interface{})

func (*CmdLogger) Print

func (cl *CmdLogger) Print(v ...interface{})

func (*CmdLogger) Printf

func (cl *CmdLogger) Printf(format string, v ...interface{})

func (*CmdLogger) Println

func (cl *CmdLogger) Println(v ...interface{})

Jump to

Keyboard shortcuts

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