beam: github.com/apache/beam/sdks/go/pkg/beam/log Index | Files

package log

import "github.com/apache/beam/sdks/go/pkg/beam/log"

Package log contains a re-targetable context-aware logging system. Notably, it allows Beam runners to transparently provide appropriate logging context -- such as DoFn or bundle information -- for user code logging.

Index

Package Files

log.go standard.go

func Debug Uses

func Debug(ctx context.Context, v ...interface{})

Debug writes the fmt.Sprint-formatted arguments to the global logger with debug severity.

func Debugf Uses

func Debugf(ctx context.Context, format string, v ...interface{})

Debugf writes the fmt.Sprintf-formatted arguments to the global logger with debug severity.

func Debugln Uses

func Debugln(ctx context.Context, v ...interface{})

Debugln writes the fmt.Sprintln-formatted arguments to the global logger with debug severity.

func Error Uses

func Error(ctx context.Context, v ...interface{})

Error writes the fmt.Sprint-formatted arguments to the global logger with error severity.

func Errorf Uses

func Errorf(ctx context.Context, format string, v ...interface{})

Errorf writes the fmt.Sprintf-formatted arguments to the global logger with error severity.

func Errorln Uses

func Errorln(ctx context.Context, v ...interface{})

Errorln writes the fmt.Sprintln-formatted arguments to the global logger with error severity.

func Exit Uses

func Exit(ctx context.Context, v ...interface{})

Exit writes the fmt.Sprint-formatted arguments to the global logger with fatal severity. It then exits.

func Exitf Uses

func Exitf(ctx context.Context, format string, v ...interface{})

Exitf writes the fmt.Sprintf-formatted arguments to the global logger with fatal severity. It then exits.

func Exitln Uses

func Exitln(ctx context.Context, v ...interface{})

Exitln writes the fmt.Sprintln-formatted arguments to the global logger with fatal severity. It then exits.

func Fatal Uses

func Fatal(ctx context.Context, v ...interface{})

Fatal writes the fmt.Sprint-formatted arguments to the global logger with fatal severity. It then panics.

func Fatalf Uses

func Fatalf(ctx context.Context, format string, v ...interface{})

Fatalf writes the fmt.Sprintf-formatted arguments to the global logger with fatal severity. It then panics.

func Fatalln Uses

func Fatalln(ctx context.Context, v ...interface{})

Fatalln writes the fmt.Sprintln-formatted arguments to the global logger with fatal severity. It then panics.

func Info Uses

func Info(ctx context.Context, v ...interface{})

Info writes the fmt.Sprint-formatted arguments to the global logger with info severity.

func Infof Uses

func Infof(ctx context.Context, format string, v ...interface{})

Infof writes the fmt.Sprintf-formatted arguments to the global logger with info severity.

func Infoln Uses

func Infoln(ctx context.Context, v ...interface{})

Infoln writes the fmt.Sprintln-formatted arguments to the global logger with info severity.

func Output Uses

func Output(ctx context.Context, sev Severity, calldepth int, msg string)

Output logs the given message to the global logger. Calldepth is the count of the number of frames to skip when computing the file name and line number.

func SetLogger Uses

func SetLogger(l Logger)

SetLogger sets the global Logger. Intended to be called during initialization only.

func Warn Uses

func Warn(ctx context.Context, v ...interface{})

Warn writes the fmt.Sprint-formatted arguments to the global logger with warn severity.

func Warnf Uses

func Warnf(ctx context.Context, format string, v ...interface{})

Warnf writes the fmt.Sprintf-formatted arguments to the global logger with warn severity.

func Warnln Uses

func Warnln(ctx context.Context, v ...interface{})

Warnln writes the fmt.Sprintln-formatted arguments to the global logger with warn severity.

type Logger Uses

type Logger interface {
    // Log logs the message in some implementation-dependent way. Log should
    // always return regardless of the severity.
    Log(ctx context.Context, sev Severity, calldepth int, msg string)
}

Logger is a context-aware logging backend. The richer context allows for more sophisticated logging setups. Must be concurrency safe.

type Severity Uses

type Severity int

Severity is the severity of the log message.

const (
    SevUnspecified Severity = iota
    SevDebug
    SevInfo
    SevWarn
    SevError
    SevFatal
)

type Standard Uses

type Standard struct {
    // Level is the severity cutoff for log messages. By default all
    // messages are logged.
    Level Severity
}

Standard is a wrapper over the standard Go logger.

func (*Standard) Log Uses

func (s *Standard) Log(ctx context.Context, sev Severity, calldepth int, msg string)

Log logs the message to the standard Go logger. For Panic, it does not perform the os.Exit(1) call, but defers to the log wrapper.

Package log imports 4 packages (graph) and is imported by 29 packages. Updated 2018-03-08. Refresh now. Tools for package owners.