log

package
v1.3.361 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 4 Imported by: 79

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation(def bool) bool

AskForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")

func Blank

func Blank()

func ConfigureLog

func ConfigureLog(level string)

func Error

func Error(msg string)

func Errorf

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

func Failure

func Failure(msg string)

func Failuref

func Failuref(msg string, args ...interface{})

func Fatal

func Fatal(msg string)

func Fatalf

func Fatalf(msg string, args ...interface{})

func Info

func Info(msg string)

func Infof

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

func Infoln

func Infoln(msg string)

func Success

func Success(msg string)

func Successf

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

func Warn

func Warn(msg string)

func Warnf

func Warnf(msg string, args ...interface{})

Types

type SimpleLogFormatter

type SimpleLogFormatter struct {
}

func (*SimpleLogFormatter) Format

func (f *SimpleLogFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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