import "golang.org/x/pkgsite/internal/log"
Package log supports structured and unstructured logging with levels.
Debug logs arg, which can be a string or a struct, at the Debug level.
Debugf logs a formatted string at the Debug level.
Error logs arg, which can be a string or a struct, at the Error level.
Errorf logs a formatted string at the Error level.
Fatal logs arg, which can be a string or a struct, at the Critical level followed by exiting the program.
Fatalf logs formatted string at the Critical level followed by exiting the program.
Info logs arg, which can be a string or a struct, at the Info level.
Infof logs a formatted string at the Info level.
NewContextWithLabel creates anew context from ctx that adds a label that will appear in the log entry.
NewContextWithTraceID creates a new context from ctx that adds the trace ID.
Set the log level
func UseStackdriver(ctx context.Context, cfg *config.Config, logName string) (_ *logging.Logger, err error)
UseStackdriver switches from the default stdlib logger to a Stackdriver logger. It assumes config.Init has been called. UseStackdriver returns a "parent" *logging.Logger that should be used to log the start and end of a request. It also creates and remembers internally a "child" logger that will be used to log within a request. The two loggers are necessary to get request-scoped logs in Stackdriver. See https://cloud.google.com/appengine/docs/standard/go/writing-application-logs.
UseStackdriver can only be called once. If it is called a second time, it returns an error.
Warning logs arg, which can be a string or a struct, at the Warning level.
Warningf logs a formatted string at the Warning level.
Package log imports 11 packages (graph) and is imported by 28 packages. Updated 2021-01-24. Refresh now. Tools for package owners.