log
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
const (LevelTrace =Level(codersdk.LogLevelTrace)LevelDebug =Level(codersdk.LogLevelDebug)LevelInfo =Level(codersdk.LogLevelInfo)LevelWarn =Level(codersdk.LogLevelWarn)LevelError =Level(codersdk.LogLevelError))
Below constants are the same as their codersdk equivalents.
Variables¶
This section is empty.
Functions¶
funcHijackLogrus¶
HijackLogrus hijacks the logrus logger and calls the callback for each log entry.This is an abuse of logrus, the package that Kaniko uses, but it exposesno other way to obtain the log entries.
Types¶
typeFunc¶
funcCoder¶
func Coder(ctxcontext.Context, coderURL *url.URL, tokenstring) (loggerFunc, closer func(), errerror)
Coder establishes a connection to the Coder instance located at coderURL andauthenticates using token. It then establishes a dRPC connection to the AgentAPI and begins sending logs. If the version of Coder does not support theAgent API, it will fall back to using the PatchLogs endpoint. The closer isused to close the logger and to wait at most logSendGracePeriod for logs tobe sent. Cancelling the context will close the logs immediately withoutwaiting for logs to be sent.