log

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package log is a wrapper around the fmt package to print messages to the terminal.

Index

Constants

This section is empty.

Variables

View Source
var (
	DiagnosticWriter = color.Error
	OutputWriter     = color.Output
)

Wrapper writers around standard error and standard output that work on windows.

Functions

func Debug

func Debug(args ...interface{})

Debug writes the message to standard error in grey.

func Debugf

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

Debugf formats according to the specifier, colors the message in grey, and writes to standard error.

func Debugln

func Debugln(args ...interface{})

Debugln writes the message to standard error in grey and with a new line.

func Error

func Error(args ...interface{})

Error prefixes the message with a red "✘ Error!", and writes to standard error.

func Errorf

func Errorf(format string, args ...interface{})

Errorf formats according to the specifier, prefixes the message with a red "✘ Error!", and writes to standard error.

func Errorln

func Errorln(args ...interface{})

Errorln prefixes the message with a red "✘ Error!", and writes to standard error with a new line.

func Info

func Info(args ...interface{})

Info writes the message to standard error with the default color.

func Infof

func Infof(format string, args ...interface{})

Infof formats according to the specifier, and writes to standard error with the default color.

func Infoln

func Infoln(args ...interface{})

Infoln writes the message to standard error with the default color and new line.

func Serror

func Serror(args ...interface{}) string

Serror prefixes the message with a red "✘ Error!", and returns it.

func Serrorf

func Serrorf(format string, args ...interface{}) string

Serrorf formats according to the specifier, prefixes the message with a red "✘ Error!", and returns it.

func Serrorln

func Serrorln(args ...interface{}) string

Serrorln prefixes the message with a red "✘ Error!", appends a new line, and returns it.

func Ssuccess

func Ssuccess(args ...interface{}) string

Ssuccess prefixes the message with a green "✔ Success!", and returns it.

func Ssuccessf

func Ssuccessf(format string, args ...interface{}) string

Ssuccessf formats according to the specifier, prefixes the message with a green "✔ Success!", and returns it.

func Ssuccessln

func Ssuccessln(args ...interface{}) string

Ssuccessln prefixes the message with a green "✔ Success!", appends a new line, and returns it.

func Success

func Success(args ...interface{})

Success prefixes the message with a green "✔ Success!", and writes to standard error.

func Successf

func Successf(format string, args ...interface{})

Successf formats according to the specifier, prefixes the message with a green "✔ Success!", and writes to standard error.

func Successln

func Successln(args ...interface{})

Successln prefixes the message with a green "✔ Success!", and writes to standard error with a new line.

func Warning

func Warning(args ...interface{})

Warning prefixes the message with a "Note:", colors the *entire* message in yellow, writes to standard error.

func Warningf

func Warningf(format string, args ...interface{})

Warningf formats according to the specifier, prefixes the message with a "Note:", colors the *entire* message in yellow, and writes to standard error.

func Warningln

func Warningln(args ...interface{})

Warningln prefixes the message with a "Note:", colors the *entire* message in yellow, writes to standard error with a new line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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