fabric: github.com/hyperledger/fabric/vendor/github.com/spf13/jwalterweatherman Index | Files

package jwalterweatherman

import "github.com/hyperledger/fabric/vendor/github.com/spf13/jwalterweatherman"

Index

Package Files

default_notepad.go log_counter.go notepad.go

Variables

var (
    TRACE    *log.Logger
    DEBUG    *log.Logger
    INFO     *log.Logger
    WARN     *log.Logger
    ERROR    *log.Logger
    CRITICAL *log.Logger
    FATAL    *log.Logger

    LOG      *log.Logger
    FEEDBACK *Feedback
)

func LogCountForLevel Uses

func LogCountForLevel(l Threshold) uint64

LogCountForLevel returns the number of log invocations for a given threshold.

func LogCountForLevelsGreaterThanorEqualTo Uses

func LogCountForLevelsGreaterThanorEqualTo(threshold Threshold) uint64

LogCountForLevelsGreaterThanorEqualTo returns the number of log invocations greater than or equal to a given threshold.

func ResetLogCounters Uses

func ResetLogCounters()

ResetLogCounters resets the invocation counters for all levels.

func SetFlags Uses

func SetFlags(flags int)

SetFlags set the flags for the default logger. "log.Ldate | log.Ltime" by default.

func SetLogOutput Uses

func SetLogOutput(handle io.Writer)

SetLogOutput set the log output for the default notepad. Discarded by default.

func SetLogThreshold Uses

func SetLogThreshold(threshold Threshold)

SetLogThreshold set the log threshold for the default notepad. Trace by default.

func SetPrefix Uses

func SetPrefix(prefix string)

SetPrefix set the prefix for the default logger. Empty by default.

func SetStdoutThreshold Uses

func SetStdoutThreshold(threshold Threshold)

SetStdoutThreshold set the standard output threshold for the default notepad. Info by default.

type Feedback Uses

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

Feedback writes plainly to the outHandle while logging with the standard extra information (date, file, etc).

func (*Feedback) Print Uses

func (fb *Feedback) Print(v ...interface{})

func (*Feedback) Printf Uses

func (fb *Feedback) Printf(format string, v ...interface{})

func (*Feedback) Println Uses

func (fb *Feedback) Println(v ...interface{})

type Notepad Uses

type Notepad struct {
    TRACE    *log.Logger
    DEBUG    *log.Logger
    INFO     *log.Logger
    WARN     *log.Logger
    ERROR    *log.Logger
    CRITICAL *log.Logger
    FATAL    *log.Logger

    LOG      *log.Logger
    FEEDBACK *Feedback
    // contains filtered or unexported fields
}

Notepad is where you leave a note!

func NewNotepad Uses

func NewNotepad(outThreshold Threshold, logThreshold Threshold, outHandle, logHandle io.Writer, prefix string, flags int) *Notepad

NewNotepad create a new notepad.

func (*Notepad) GetLogThreshold Uses

func (n *Notepad) GetLogThreshold() Threshold

GetStdoutThreshold returns the defined Treshold for the log logger.

func (*Notepad) GetStdoutThreshold Uses

func (n *Notepad) GetStdoutThreshold() Threshold

GetStdoutThreshold returns the Treshold for the stdout logger.

func (*Notepad) LogCountForLevel Uses

func (n *Notepad) LogCountForLevel(l Threshold) uint64

LogCountForLevel returns the number of log invocations for a given threshold.

func (*Notepad) LogCountForLevelsGreaterThanorEqualTo Uses

func (n *Notepad) LogCountForLevelsGreaterThanorEqualTo(threshold Threshold) uint64

LogCountForLevelsGreaterThanorEqualTo returns the number of log invocations greater than or equal to a given threshold.

func (*Notepad) ResetLogCounters Uses

func (n *Notepad) ResetLogCounters()

ResetLogCounters resets the invocation counters for all levels.

func (*Notepad) SetFlags Uses

func (n *Notepad) SetFlags(flags int)

SetFlags choose which flags the logger will display (after prefix and message level). See the package log for more informations on this.

func (*Notepad) SetLogOutput Uses

func (n *Notepad) SetLogOutput(handle io.Writer)

SetLogOutput changes the file where log messages are written.

func (*Notepad) SetLogThreshold Uses

func (n *Notepad) SetLogThreshold(threshold Threshold)

SetLogThreshold changes the threshold above which messages are written to the log file.

func (*Notepad) SetPrefix Uses

func (n *Notepad) SetPrefix(prefix string)

SetPrefix changes the prefix used by the notepad. Prefixes are displayed between brackets at the beginning of the line. An empty prefix won't be displayed at all.

func (*Notepad) SetStdoutThreshold Uses

func (n *Notepad) SetStdoutThreshold(threshold Threshold)

SetStdoutThreshold changes the threshold above which messages are written to the standard output.

type Threshold Uses

type Threshold int
const (
    LevelTrace Threshold = iota
    LevelDebug
    LevelInfo
    LevelWarn
    LevelError
    LevelCritical
    LevelFatal
)

func GetLogThreshold Uses

func GetLogThreshold() Threshold

GetStdoutThreshold returns the defined Treshold for the log logger.

func GetStdoutThreshold Uses

func GetStdoutThreshold() Threshold

GetStdoutThreshold returns the Treshold for the stdout logger.

func LogThreshold Uses

func LogThreshold() Threshold

Level returns the current global log threshold.

func StdoutThreshold Uses

func StdoutThreshold() Threshold

Level returns the current global output threshold.

func (Threshold) String Uses

func (t Threshold) String() string

Package jwalterweatherman imports 6 packages (graph). Updated 2019-04-25. Refresh now. Tools for package owners.