Title: Provisionerd: log provisioner output to provisionerd log · Issue #1733 · coder/coder · GitHub
Open Graph Title: Provisionerd: log provisioner output to provisionerd log · Issue #1733 · coder/coder
X Title: Provisionerd: log provisioner output to provisionerd log · Issue #1733 · coder/coder
Description: What is your suggestion? Currently we only log provisioner job output at debug level, regardless of the log level of the provisioner job log -- meaning that most users won't see it by default in the coderd output. Instead, log the conten...
Open Graph Description: What is your suggestion? Currently we only log provisioner job output at debug level, regardless of the log level of the provisioner job log -- meaning that most users won't see it by default in th...
X Description: What is your suggestion? Currently we only log provisioner job output at debug level, regardless of the log level of the provisioner job log -- meaning that most users won't see it by default i...
Opengraph URL: https://github.com/coder/coder/issues/1733
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provisionerd: log provisioner output to provisionerd log","articleBody":"## What is your suggestion?\r\n\r\nCurrently we only log provisioner job output at debug level, regardless of the log level of the provisioner job log -- meaning that most users won't see it by default in the coderd output.\r\n\r\nInstead, log the content of `sdkproto.Provision_Response_Log.Log.Output` to a separate logger.\r\nThis should be a separate logger to the main `coderd` log, and should have independent verbosity configurable via CLI flag and env var. \r\n\r\nPart of this change could involve some handy interface between `sdkproto.LogLevel` and `slog.Logger` e.g.\r\n\r\n```\r\ntype levelLogger struct {\r\n\tslog.Logger\r\n}\r\n\r\nfunc (l *levelLogger) LogWithLevel(ctx context.Context, level sdkproto.LogLevel, msg string, fields ...slog.Field) {\r\n\tswitch level {\r\n\tcase sdkproto.LogLevel_DEBUG:\r\n\t\tl.Debug(ctx, msg, fields...)\r\n\tcase sdkproto.LogLevel_TRACE:\r\n\t\tl.Debug(ctx, msg, fields...)\r\n\tcase sdkproto.LogLevel_ERROR:\r\n\t\tl.Error(ctx, msg, fields...)\r\n\tcase sdkproto.LogLevel_WARN:\r\n\t\tl.Warn(ctx, msg, fields...)\r\n\tdefault:\r\n\t\tl.Info(ctx, msg, fields...)\r\n\t}\r\n}\r\n\r\n```\r\n\r\n## Why do you want this feature?\r\n\r\nIn larger environments, Coder administrators may need to debug build / provision errors on behalf of users.\r\nIn these cases, it would be useful to have the logs available to administartors.\r\n\r\n## Are there any workarounds to get this functionality today?\r\n\r\nUsers would have to copy-paste the provisioner output to the Coder adminstrator, who would then need to correlate that with the coderd/provisionerd logs. This requires extra coordination and effort on behalf of both admin and user.\r\n\r\n## Are you interested in submitting a PR for this?\r\n\r\nYes","author":{"url":"https://github.com/johnstcn","@type":"Person","name":"johnstcn"},"datePublished":"2022-05-25T11:23:37Z","url":"https://github.com/coder/coder/issues/1733"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4fcc68d4-f729-cc3b-107a-a65b9c1ac69c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CEA:AFBD9:56752:70BF5:6B01812E |
| html-safe-nonce | b0f459cf58d94c80f1343c6eda75ae1a3f3474c2ff6445d17af261c64d1821a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0VBOkFGQkQ5OjU2NzUyOjcwQkY1OjZCMDE4MTJFIiwidmlzaXRvcl9pZCI6IjYzMTEyMDg2ODA5NDM2MTYzMDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c2e1d20a502b67c20bf29ea2b6d807515d224b852d66c8a4b1ec799d731d6b8b |
| hovercard-subject-tag | issue:1247951300 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/1733/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cfcf094f3b11f11873bc162ee33223b6b5934b1b037e885955cbbb781c5e0811/coder/coder/issues/1733 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cfcf094f3b11f11873bc162ee33223b6b5934b1b037e885955cbbb781c5e0811/coder/coder/issues/1733 |
| og:image:alt | What is your suggestion? Currently we only log provisioner job output at debug level, regardless of the log level of the provisioner job log -- meaning that most users won't see it by default in th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnstcn |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width