Skip to content

Commit

Permalink
pkg/util/log: remove stderr config code for deprecated log format
Browse files Browse the repository at this point in the history
Code used to validate the stderr config parsing previously checked to
see if the `crdb-v1-tty` format was being used when `auditable: true`
was set. If it was, it changed the format to `crdb-v1-tty-count`.

However, the `crdb-v1` log formats have long been deprecated, and the
official logging documentation states:

https://www.cockroachlabs.com/docs/stable/configure-logs#output-to-stderr
> Note: The `format` parameter for `stderr` is set to `crdb-v2-tty` and
cannot be changed.

Given this, it not longer makes sense to have code that accounts for a
stderr log format that's no longer valid. Instead, we should *always*
assert the format to be `crdb-v2-tty` to align with what our
documentation says. A following patch will add this assertion.

Release note: none
  • Loading branch information
abarganier committed Oct 31, 2023
1 parent 1a7ab38 commit a53586f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/util/log/logconfig/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ func (c *Config) Validate(defaultLogDir *string) (resErr error) {
}
propagateCommonDefaults(&c.Sinks.Stderr.CommonSinkConfig, c.FileDefaults.CommonSinkConfig)
if c.Sinks.Stderr.Auditable != nil && *c.Sinks.Stderr.Auditable {
if *c.Sinks.Stderr.Format == "crdb-v1-tty" {
f := "crdb-v1-tty-count"
c.Sinks.Stderr.Format = &f
}
c.Sinks.Stderr.Criticality = &bt
}
c.Sinks.Stderr.Auditable = nil
Expand Down

0 comments on commit a53586f

Please sign in to comment.