Documentation ¶
Overview ¶
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 ¶
- func Debug(ctx context.Context, v ...interface{})
- func Debugf(ctx context.Context, format string, v ...interface{})
- func Debugln(ctx context.Context, v ...interface{})
- func Error(ctx context.Context, v ...interface{})
- func Errorf(ctx context.Context, format string, v ...interface{})
- func Errorln(ctx context.Context, v ...interface{})
- func Exit(ctx context.Context, v ...interface{})
- func Exitf(ctx context.Context, format string, v ...interface{})
- func Exitln(ctx context.Context, v ...interface{})
- func Fatal(ctx context.Context, v ...interface{})
- func Fatalf(ctx context.Context, format string, v ...interface{})
- func Fatalln(ctx context.Context, v ...interface{})
- func Info(ctx context.Context, v ...interface{})
- func Infof(ctx context.Context, format string, v ...interface{})
- func Infoln(ctx context.Context, v ...interface{})
- func Output(ctx context.Context, sev Severity, calldepth int, msg string)
- func SetLogger(l Logger)
- func Warn(ctx context.Context, v ...interface{})
- func Warnf(ctx context.Context, format string, v ...interface{})
- func Warnln(ctx context.Context, v ...interface{})
- type Logger
- type Severity
- type Standard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug writes the fmt.Sprint-formatted arguments to the global logger with debug severity.
func Debugf ¶
Debugf writes the fmt.Sprintf-formatted arguments to the global logger with debug severity.
func Debugln ¶
Debugln writes the fmt.Sprintln-formatted arguments to the global logger with debug severity.
func Error ¶
Error writes the fmt.Sprint-formatted arguments to the global logger with error severity.
func Errorf ¶
Errorf writes the fmt.Sprintf-formatted arguments to the global logger with error severity.
func Errorln ¶
Errorln writes the fmt.Sprintln-formatted arguments to the global logger with error severity.
func Exit ¶
Exit writes the fmt.Sprint-formatted arguments to the global logger with fatal severity. It then exits.
func Exitf ¶
Exitf writes the fmt.Sprintf-formatted arguments to the global logger with fatal severity. It then exits.
func Exitln ¶
Exitln writes the fmt.Sprintln-formatted arguments to the global logger with fatal severity. It then exits.
func Fatal ¶
Fatal writes the fmt.Sprint-formatted arguments to the global logger with fatal severity. It then panics.
func Fatalf ¶
Fatalf writes the fmt.Sprintf-formatted arguments to the global logger with fatal severity. It then panics.
func Fatalln ¶
Fatalln writes the fmt.Sprintln-formatted arguments to the global logger with fatal severity. It then panics.
func Infof ¶
Infof writes the fmt.Sprintf-formatted arguments to the global logger with info severity.
func Infoln ¶
Infoln writes the fmt.Sprintln-formatted arguments to the global logger with info severity.
func Output ¶
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 ¶
func SetLogger(l Logger)
SetLogger sets the global Logger. Intended to be called during initialization only.
Types ¶
type Logger ¶
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.