{"modulePath":"github.com/docker/CLI","version":"v29.10.1+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package debug\n\n## Variables\n\n```go\nvar OTELErrorHandler otel.ErrorHandler = otel.ErrorHandlerFunc(func(err error) {\n\tif err == nil {\n\t\treturn\n\t}\n\tlogrus.WithError(err).Debug(\"otel error\")\n})\n```\nOTELErrorHandler is an error handler for OTEL that uses the CLI debug package to log messages when an error occurs.\n\nThe default is to log to the debug level which is only enabled when debugging is enabled.\n\n## Functions\n\n```go\nfunc Disable()\n```\nDisable sets the DEBUG env var to false and makes the logger to log at info level.\n\n```go\nfunc Enable()\n```\nEnable sets the DEBUG env var to true and makes the logger to log at debug level.\n\n```go\nfunc IsEnabled() bool\n```\nIsEnabled checks whether the debug flag is set or not.\n\n","path":"github.com/docker/CLI/cli/debug","name":"debug","synopsis":"","isRedistributable":true}
