jx: github.com/jenkins-x/jx/pkg/log Index | Files

package log

import "github.com/jenkins-x/jx/pkg/log"

Index

Package Files

log.go

func Blank Uses

func Blank()

Blank prints a blank line

func CaptureOutput Uses

func CaptureOutput(f func()) string

CaptureOutput calls the specified function capturing and returning all logged messages.

func GetLevel Uses

func GetLevel() string

GetLevel gets the current log level

func GetLevels Uses

func GetLevels() []string

GetLevels returns the list of valid log levels

func Logger Uses

func Logger() *logrus.Entry

Logger obtains the logger for use in the jx codebase This is the only way you should obtain a logger

func SetLevel Uses

func SetLevel(s string) error

SetLevel sets the logging level

func SetOutput Uses

func SetOutput(out io.Writer)

SetOutput sets the outputs for the default logger.

type FormatLayoutType Uses

type FormatLayoutType string

FormatLayoutType the layout kind

const (
    // FormatLayoutJSON uses JSON layout
    FormatLayoutJSON FormatLayoutType = "json"

    // FormatLayoutText uses classic colorful Jenkins X layout
    FormatLayoutText FormatLayoutType = "text"
)

type JenkinsXTextFormat Uses

type JenkinsXTextFormat struct {
    ShowInfoLevel   bool
    ShowTimestamp   bool
    TimestampFormat string
}

JenkinsXTextFormat lets use a custom text format

func NewJenkinsXTextFormat Uses

func NewJenkinsXTextFormat() *JenkinsXTextFormat

NewJenkinsXTextFormat creates the default Jenkins X text formatter

func (*JenkinsXTextFormat) Format Uses

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

Format formats the log statement

Package log imports 9 packages (graph) and is imported by 120 packages. Updated 2019-11-10. Refresh now. Tools for package owners.