conslogging

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MPL-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleLogger

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

ConsoleLogger is a writer for consoles.

func Current

func Current(disableColors bool) ConsoleLogger

Current returns the current console.

func (ConsoleLogger) Prefix

func (cl ConsoleLogger) Prefix() string

Prefix returns the console's prefix.

func (ConsoleLogger) PrintBytes

func (cl ConsoleLogger) PrintBytes(data []byte)

PrintBytes prints bytes directly to the console.

func (ConsoleLogger) PrintSuccess

func (cl ConsoleLogger) PrintSuccess()

PrintSuccess prints the success message.

func (ConsoleLogger) Printf

func (cl ConsoleLogger) Printf(format string, args ...interface{})

Printf prints formatted text to the console.

func (ConsoleLogger) WithCached

func (cl ConsoleLogger) WithCached(isCached bool) ConsoleLogger

WithCached returns a ConsoleLogger with isCached flag set accordingly.

func (ConsoleLogger) WithPrefix

func (cl ConsoleLogger) WithPrefix(prefix string) ConsoleLogger

WithPrefix returns a ConsoleLogger with a prefix added.

Jump to

Keyboard shortcuts

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