forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
82891: log: embed error hints in unstructured entries r=abargainier,cameronnunez a=knz Fixes cockroachdb#80875. cc `@dhartunian` With this commit, if a `log.Infof` (or warning, error, fatal etc) call is passed an `error` object as argument, and that error object contains hints, the hints are copied into the resulting log entry and emitted to the sink. At this time, we only have hints in very few places. This change is thus merely infrastructure that will promote the implementation of hints over time. Example, before: ``` W220614 15:55:33.935575 1 cli/start.go:184 [n?] 5 cannot create trace dir; traces will not be dumped: mkdir inflight_trace_dump: permission denied ``` Example, after: ``` W220614 15:57:58.669410 1 cli/start.go:185 [n?] 5 cannot create trace dir; traces will not be dumped: mkdir inflight_trace_dump: permission denied W220614 15:57:58.669410 1 cli/start.go:185 [n?] 5 +HINT: Try changing the CWD of the cockroach process to a writable directory. ``` Release note (cli change): In some cases, CockroachDB will now include recommended remediation actions alongside log messages. We expect more suggestions to be added in later versions. Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters