console

package
v0.0.365 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CatOutputTool = idtypes.CatOutputTool
	CatOutputUs   = idtypes.CatOutputUs
)

Variables

View Source
var (
	// Configured globally.
	DebugToConsole = false
	DebugToFile    string
	RotatedFile    = false
)

Functions

func Cleanup added in v0.0.275

func Cleanup()

func ConsoleOutput

func ConsoleOutput(console writesLines, name string) io.Writer

ConsoleOutput returns a writer, whose output will be managed by the specified ConsoleSink.

func ConsoleOutputName

func ConsoleOutputName(name string) tasks.OutputName

func Debug

func Debug(ctx context.Context) io.Writer

func DebugWithTimestamp added in v0.0.303

func DebugWithTimestamp(ctx context.Context, format string, args ...any)

func EnterInputMode

func EnterInputMode(ctx context.Context, params ...string) func()

func Errors

func Errors(ctx context.Context) io.Writer

func GetErrContext

func GetErrContext(ctx context.Context) *actionErrContext

func Info added in v0.0.359

func Info(ctx context.Context) io.Writer

func IsConsoleLike

func IsConsoleLike(ctx context.Context) bool

func MakeConsoleName

func MakeConsoleName(logid string, key string, suffix string) string

func NamedDebug added in v0.0.91

func NamedDebug(ctx context.Context, name string) io.Writer

func Output

func Output(ctx context.Context, name string) io.Writer

func Prepare added in v0.0.275

func Prepare() error

func SetStickyContent

func SetStickyContent(ctx context.Context, name string, content string)

func SetStickyContentOnSink

func SetStickyContentOnSink(sink tasks.ActionSink, name string, content string)

func Stderr

func Stderr(ctx context.Context) io.Writer

func Stdout

func Stdout(ctx context.Context) io.Writer

func TypedOutput

func TypedOutput(ctx context.Context, name string, cat idtypes.CatOutputType) io.Writer

func UnwrapSink

func UnwrapSink(sink tasks.ActionSink) tasks.ActionSink

func Warnings

func Warnings(ctx context.Context) io.Writer

func WithLogs

func WithLogs(ctx context.Context, err error) error

WithLogs adds additional context to the error message, but only if a given message hasn't been output in the most recent log lines.

func WriteJSON

func WriteJSON(w io.Writer, message string, data interface{})

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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