{"modulePath":"github.com/coder/envbuilder","version":"v1.0.0-rc.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package log\n\n## Constants\n\n```go\nconst (\n\tLevelTrace = Level(codersdk.LogLevelTrace)\n\tLevelDebug = Level(codersdk.LogLevelDebug)\n\tLevelInfo  = Level(codersdk.LogLevelInfo)\n\tLevelWarn  = Level(codersdk.LogLevelWarn)\n\tLevelError = Level(codersdk.LogLevelError)\n)\n```\nBelow constants are the same as their codersdk equivalents.\n\n## Types\n\n```go\ntype Func func(l Level, msg string, args ...any)\n```\n\n```go\nfunc Coder(ctx context.Context, coderURL *url.URL, token string) (Func, func(), error)\n```\nCoder establishes a connection to the Coder instance located at coderURL and authenticates using token. It then establishes a dRPC connection to the Agent API and begins sending logs. If the version of Coder does not support the Agent API, it will fall back to using the PatchLogs endpoint. The returned function is used to block until all logs are sent.\n\n```go\nfunc New(w io.Writer, verbose bool) Func\n```\nNew logs to the provided io.Writer.\n\n```go\nfunc Wrap(fs ...Func) Func\n```\nWrap wraps the provided LogFuncs into a single Func.\n\n```go\ntype Level string\n```\n\n","path":"github.com/coder/envbuilder/internal/log","name":"log","synopsis":"","isRedistributable":true}
