logging

package
v0.18.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputWriter io.Writer      = os.Stdout
	ErrorWriter  io.Writer      = os.Stderr
	Level        pterm.LogLevel = pterm.LogLevelInfo
	CustomLogger                = &pterm.Logger{
		Level:    Level,
		Writer:   OutputWriter,
		MaxWidth: 1000,
	}
	Description = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.DescriptionMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.DescriptionPrefixStyle,
			Text:  "DESCRIPTION",
		},
		Writer: OutputWriter,
	}
	Info = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.InfoMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.InfoPrefixStyle,
			Text:  "INFO",
		},
		Writer: OutputWriter,
	}
	Success = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.SuccessMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.SuccessPrefixStyle,
			Text:  "SUCCESS",
		},
		Writer: OutputWriter,
	}
	Error = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.ErrorMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.ErrorPrefixStyle,
			Text:  " ERROR ",
		},
		Writer: ErrorWriter,
	}
	Fatal = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.FatalMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.FatalPrefixStyle,
			Text:  " FATAL ",
		},
		Writer: ErrorWriter,
		Fatal:  true,
	}
	Warning = pterm.PrefixPrinter{
		MessageStyle: &pterm.ThemeDefault.WarningMessageStyle,
		Prefix: pterm.Prefix{
			Style: &pterm.ThemeDefault.WarningPrefixStyle,
			Text:  "WARNING",
		},
		Writer: OutputWriter,
	}
	Skip = pterm.PrefixPrinter{
		MessageStyle: pterm.NewStyle(pterm.FgDarkGray),
		Prefix: pterm.Prefix{
			Style: pterm.NewStyle(pterm.FgBlack, pterm.BgGray),
			Text:  "SKIP",
		},
		Writer: OutputWriter,
	}
)

Functions

func Debug

func Debug(message string)

func Debugf added in v0.11.6

func Debugf(message string, args ...interface{})

func Init added in v0.18.0

func Init()

func StripAnsi added in v0.18.0

func StripAnsi(str string) string

func Trace added in v0.11.6

func Trace(message string)

func Tracef added in v0.11.6

func Tracef(message string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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