log

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndentationLevel = 0

IndentationLevel controls the amount of indentation of log messages.

View Source
var NoColor bool

NoColor and noColorEnv control whether stdout and stderr are colorized or not Two variables are used to prevent races when they are set. NoColor is set by the dbt command invokation after cobra parses the cli args. noColorEnv is set by the init function of this package. As long as one of the flags is true, the output is not colorized.

View Source
var Verbose bool

Verbose controls whether debug messages are being printed.

Functions

func Debug

func Debug(format string, a ...interface{})

Debug prints an indented and formatted debug message to os.Stdout if verbose output is selected.

func Error

func Error(format string, a ...interface{})

Error prints an indented and formatted error message to os.Stdout.

func ErrorOccured

func ErrorOccured() bool

ErrorOccured reports whether any errors have occured.

func Fatal

func Fatal(format string, a ...interface{})

Fatal prints an indented and formatted error message to os.Stdout and terminates the program.

func GetColorString

func GetColorString(color Color) string

func Log

func Log(format string, a ...interface{})

Log prints an indented and formatted message to os.Stdout.

func Success

func Success(format string, a ...interface{})

Success prints an indented and formatted success message to os.Stdout.

func Warning

func Warning(format string, a ...interface{})

Warning prints an indented and formatted warning to os.Stdout.

Types

type Color

type Color uint
const (
	ColorReset Color = iota
	ColorBlue
	ColorRed
	ColorGreen
	ColorYellow
)

Jump to

Keyboard shortcuts

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