package bklog
import "github.com/moby/buildkit/util/bklog"
Index ¶
- Variables
- func EnableLogWithTraceID(b bool)
- func GetLogger(ctx context.Context) (l *logrus.Entry)
- func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context
- type LazyStackTrace
Variables ¶
var ( G = GetLogger L = logrus.NewEntry(logrus.StandardLogger()) )
Functions ¶
func EnableLogWithTraceID ¶
func EnableLogWithTraceID(b bool)
func GetLogger ¶
GetLogger retrieves the current logger from the context. If no logger is available, the default logger is returned.
func WithLogger ¶
WithLogger returns a new context with the provided logger. Use in combination with logger.WithField(s) for great effect.
Types ¶
type LazyStackTrace ¶
type LazyStackTrace struct{}
LazyStackTrace lets you include a stack trace as a field's value in a log but only call it when the log level is actually enabled.
func (LazyStackTrace) MarshalText ¶
func (LazyStackTrace) MarshalText() ([]byte, error)
func (LazyStackTrace) String ¶
func (LazyStackTrace) String() string
Source Files ¶
- Version
- v0.12.0
- Published
- Jul 12, 2023
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 12 seconds ago –
Tools for package owners.