From 0786274126a95b5ff3ff93abb87e901f69b86ce3 Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Tue, 11 May 2021 15:35:59 +0100 Subject: [PATCH 1/2] serverutils: Add TestTenantID() The certificates used for testing are only valid for a specified set of tenant IDs. If you happen to copy and paste some Tenant creation code but then for some reason change the constant, your test will start failing. While not too hard debug, it would be nice if test code didn't have to know about this in most cases. The new serverutils.TestTenantID() returns the first tenant ID that the certs will work for. Many callsites that don't care about the particular ID can use this directly. Release note: None --- pkg/ccl/serverccl/server_sql_test.go | 8 ++++---- .../streamingest/stream_ingestion_job_test.go | 3 +-- pkg/ccl/streamingccl/streamingtest/replication_helpers.go | 2 +- pkg/ccl/testccl/sqlccl/BUILD.bazel | 1 - pkg/ccl/testccl/sqlccl/run_control_test.go | 3 +-- pkg/kv/kvserver/client_tenant_test.go | 6 +++--- pkg/server/diagnostics/reporter_test.go | 3 +-- pkg/sql/logictest/logic.go | 2 +- pkg/sql/sqltestutils/BUILD.bazel | 1 - pkg/sql/sqltestutils/telemetry.go | 3 +-- pkg/testutils/serverutils/test_server_shim.go | 7 +++++++ 11 files changed, 20 insertions(+), 19 deletions(-) diff --git a/pkg/ccl/serverccl/server_sql_test.go b/pkg/ccl/serverccl/server_sql_test.go index 9003b0f6c7a6..f530166581ed 100644 --- a/pkg/ccl/serverccl/server_sql_test.go +++ b/pkg/ccl/serverccl/server_sql_test.go @@ -51,7 +51,7 @@ func TestSQLServer(t *testing.T) { _, db := serverutils.StartTenant( t, tc.Server(0), - base.TestTenantArgs{TenantID: roachpb.MakeTenantID(security.EmbeddedTenantIDs()[0])}, + base.TestTenantArgs{TenantID: serverutils.TestTenantID()}, ) defer db.Close() r := sqlutils.MakeSQLRunner(db) @@ -74,7 +74,7 @@ func TestTenantCannotSetClusterSetting(t *testing.T) { defer tc.Stopper().Stop(ctx) // StartTenant with the default permissions to - _, db := serverutils.StartTenant(t, tc.Server(0), base.TestTenantArgs{TenantID: roachpb.MakeTenantID(10), AllowSettingClusterSettings: false}) + _, db := serverutils.StartTenant(t, tc.Server(0), base.TestTenantArgs{TenantID: serverutils.TestTenantID(), AllowSettingClusterSettings: false}) defer db.Close() _, err := db.Exec(`SET CLUSTER SETTING sql.defaults.vectorize=off`) require.NoError(t, err) @@ -118,7 +118,7 @@ func TestTenantHTTP(t *testing.T) { tenant, err := tc.Server(0).StartTenant(ctx, base.TestTenantArgs{ - TenantID: roachpb.MakeTenantID(security.EmbeddedTenantIDs()[0]), + TenantID: serverutils.TestTenantID(), }) require.NoError(t, err) t.Run("prometheus", func(t *testing.T) { @@ -154,7 +154,7 @@ func TestIdleExit(t *testing.T) { countdownDuration := 4000 * time.Millisecond tenant, err := tc.Server(0).StartTenant(ctx, base.TestTenantArgs{ - TenantID: roachpb.MakeTenantID(10), + TenantID: serverutils.TestTenantID(), IdleExitAfter: warmupDuration, TestingKnobs: base.TestingKnobs{ TenantTestingKnobs: &sql.TenantTestingKnobs{ diff --git a/pkg/ccl/streamingccl/streamingest/stream_ingestion_job_test.go b/pkg/ccl/streamingccl/streamingest/stream_ingestion_job_test.go index e12b59419ee6..28d589ae92a2 100644 --- a/pkg/ccl/streamingccl/streamingest/stream_ingestion_job_test.go +++ b/pkg/ccl/streamingccl/streamingest/stream_ingestion_job_test.go @@ -21,7 +21,6 @@ import ( _ "github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamproducer" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" - "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/security" "github.com/cockroachdb/cockroach/pkg/testutils" "github.com/cockroachdb/cockroach/pkg/testutils/jobutils" @@ -50,7 +49,7 @@ func TestTenantStreaming(t *testing.T) { defer source.Stopper().Stop(ctx) // Start tenant server in the srouce cluster. - tenantID := roachpb.MakeTenantID(10) + tenantID := serverutils.TestTenantID() _, tenantConn := serverutils.StartTenant(t, source, base.TestTenantArgs{TenantID: tenantID}) defer tenantConn.Close() // sourceSQL refers to the tenant generating the data. diff --git a/pkg/ccl/streamingccl/streamingtest/replication_helpers.go b/pkg/ccl/streamingccl/streamingtest/replication_helpers.go index 6b97dba3ba17..6bf98a25118a 100644 --- a/pkg/ccl/streamingccl/streamingtest/replication_helpers.go +++ b/pkg/ccl/streamingccl/streamingtest/replication_helpers.go @@ -186,7 +186,7 @@ SET CLUSTER SETTING sql.defaults.experimental_stream_replication.enabled = 'on'; require.NoError(t, err) // Start tenant server - tenantID := roachpb.MakeTenantID(10) + tenantID := serverutils.TestTenantID() _, tenantConn := serverutils.StartTenant(t, s, base.TestTenantArgs{TenantID: tenantID}) // Sink to read data from. diff --git a/pkg/ccl/testccl/sqlccl/BUILD.bazel b/pkg/ccl/testccl/sqlccl/BUILD.bazel index 7bb631eab190..a527f3d4a41a 100644 --- a/pkg/ccl/testccl/sqlccl/BUILD.bazel +++ b/pkg/ccl/testccl/sqlccl/BUILD.bazel @@ -35,7 +35,6 @@ go_test( deps = [ "//pkg/base", "//pkg/ccl/kvccl/kvtenantccl", - "//pkg/roachpb", "//pkg/security", "//pkg/security/securitytest", "//pkg/server", diff --git a/pkg/ccl/testccl/sqlccl/run_control_test.go b/pkg/ccl/testccl/sqlccl/run_control_test.go index 30e9a5b38c2d..07738f275f35 100644 --- a/pkg/ccl/testccl/sqlccl/run_control_test.go +++ b/pkg/ccl/testccl/sqlccl/run_control_test.go @@ -18,7 +18,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/ccl/kvccl/kvtenantccl" - "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/sql/sqltestutils" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" @@ -48,7 +47,7 @@ func makeRunControlTestCases(t *testing.T) ([]runControlTestCase, func()) { testCases[0].conn1 = tc.ServerConn(0).Conn testCases[0].conn2 = tc.ServerConn(1).Conn - _, tenantDB := serverutils.StartTenant(t, tc.Server(0), base.TestTenantArgs{TenantID: roachpb.MakeTenantID(10)}) + _, tenantDB := serverutils.StartTenant(t, tc.Server(0), base.TestTenantArgs{TenantID: serverutils.TestTenantID()}) testCases[1].name = "Tenant" testCases[1].conn1 = tenantDB.Conn testCases[1].conn2 = tenantDB.Conn diff --git a/pkg/kv/kvserver/client_tenant_test.go b/pkg/kv/kvserver/client_tenant_test.go index 7bfd9d0bb920..26807727d569 100644 --- a/pkg/kv/kvserver/client_tenant_test.go +++ b/pkg/kv/kvserver/client_tenant_test.go @@ -60,7 +60,7 @@ func TestTenantsStorageMetricsOnSplit(t *testing.T) { require.NoError(t, err) defer store.Stopper().Stop(ctx) - tenantID := roachpb.MakeTenantID(10) + tenantID := serverutils.TestTenantID() codec := keys.MakeSQLCodec(tenantID) tenantPrefix := codec.TenantPrefix() @@ -162,7 +162,7 @@ func TestTenantRateLimiter(t *testing.T) { ctx := context.Background() defer s.Stopper().Stop(ctx) - tenantID := roachpb.MakeTenantID(10) + tenantID := serverutils.TestTenantID() codec := keys.MakeSQLCodec(tenantID) tenantPrefix := codec.TenantPrefix() @@ -235,7 +235,7 @@ func TestTenantRateLimiter(t *testing.T) { return string(read) } makeMetricStr := func(expCount int64) string { - const tenantMetricStr = `kv_tenant_rate_limit_write_requests_admitted{store="1",tenant_id="10"}` + tenantMetricStr := fmt.Sprintf(`kv_tenant_rate_limit_write_requests_admitted{store="1",tenant_id="%d"}`, tenantID.ToUint64()) return fmt.Sprintf("%s %d", tenantMetricStr, expCount) } diff --git a/pkg/server/diagnostics/reporter_test.go b/pkg/server/diagnostics/reporter_test.go index e3c0d0578f19..66d518729016 100644 --- a/pkg/server/diagnostics/reporter_test.go +++ b/pkg/server/diagnostics/reporter_test.go @@ -22,7 +22,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/config/zonepb" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/roachpb" - "github.com/cockroachdb/cockroach/pkg/security" "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/server/diagnostics" "github.com/cockroachdb/cockroach/pkg/server/diagnostics/diagnosticspb" @@ -55,7 +54,7 @@ func TestTenantReport(t *testing.T) { defer rt.Close() tenantArgs := base.TestTenantArgs{ - TenantID: roachpb.MakeTenantID(security.EmbeddedTenantIDs()[0]), + TenantID: serverutils.TestTenantID(), AllowSettingClusterSettings: true, TestingKnobs: rt.testingKnobs, } diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index cc0c0eae4820..0307ead00ce5 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -1446,7 +1446,7 @@ func (t *logicTest) newCluster(serverArgs TestServerArgs) { if cfg.useTenant { var err error tenantArgs := base.TestTenantArgs{ - TenantID: roachpb.MakeTenantID(10), + TenantID: serverutils.TestTenantID(), AllowSettingClusterSettings: true, TestingKnobs: base.TestingKnobs{ SQLExecutor: &sql.ExecutorTestingKnobs{ diff --git a/pkg/sql/sqltestutils/BUILD.bazel b/pkg/sql/sqltestutils/BUILD.bazel index 16b208f94db8..03a8faa37a3d 100644 --- a/pkg/sql/sqltestutils/BUILD.bazel +++ b/pkg/sql/sqltestutils/BUILD.bazel @@ -16,7 +16,6 @@ go_library( "//pkg/keys", "//pkg/kv", "//pkg/roachpb", - "//pkg/security", "//pkg/server", "//pkg/server/diagnostics", "//pkg/sql", diff --git a/pkg/sql/sqltestutils/telemetry.go b/pkg/sql/sqltestutils/telemetry.go index 0479e782d675..9c59d6f9e713 100644 --- a/pkg/sql/sqltestutils/telemetry.go +++ b/pkg/sql/sqltestutils/telemetry.go @@ -23,7 +23,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/roachpb" - "github.com/cockroachdb/cockroach/pkg/security" "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/server/diagnostics" "github.com/cockroachdb/cockroach/pkg/sql" @@ -161,7 +160,7 @@ func (tt *telemetryTest) Start(t *testing.T, serverArgs []base.TestServerArgs) { log.TestingClearServerIdentifiers() tt.tenant, tt.tenantDB = serverutils.StartTenant(tt.t, tt.server, base.TestTenantArgs{ - TenantID: roachpb.MakeTenantID(security.EmbeddedTenantIDs()[0]), + TenantID: serverutils.TestTenantID(), AllowSettingClusterSettings: true, TestingKnobs: mapServerArgs[0].Knobs, }) diff --git a/pkg/testutils/serverutils/test_server_shim.go b/pkg/testutils/serverutils/test_server_shim.go index 0e094c944625..016c6748354f 100644 --- a/pkg/testutils/serverutils/test_server_shim.go +++ b/pkg/testutils/serverutils/test_server_shim.go @@ -355,6 +355,13 @@ func StartTenant( return tenant, goDB } +// TestTenantID returns a roachpb.TenantID that can be used when +// starting a test Tenant. The returned tenant IDs match those built +// into the test certificates. +func TestTenantID() roachpb.TenantID { + return roachpb.MakeTenantID(security.EmbeddedTenantIDs()[0]) +} + // GetJSONProto uses the supplied client to GET the URL specified by the parameters // and unmarshals the result into response. func GetJSONProto(ts TestServerInterface, path string, response protoutil.Message) error { From 2b0f6afd311688444bff50af29b2bf253b4da9b0 Mon Sep 17 00:00:00 2001 From: taroface Date: Tue, 11 May 2021 17:44:14 -0400 Subject: [PATCH 2/2] util/log,docs/generated: update links in the generated documentation Release note: None --- docs/generated/logformats.md | 78 ++++++++++++++++---------------- docs/generated/logsinks.md | 2 +- pkg/util/log/format_crdb_v1.go | 24 +++++----- pkg/util/log/format_crdb_v2.go | 30 ++++++------ pkg/util/log/logconfig/config.go | 2 +- 5 files changed, 68 insertions(+), 68 deletions(-) diff --git a/docs/generated/logformats.md b/docs/generated/logformats.md index c0427f30e18c..1ebca1bd927b 100644 --- a/docs/generated/logformats.md +++ b/docs/generated/logformats.md @@ -77,18 +77,18 @@ Each line of output starts with the following prefix: Lyymmdd hh:mm:ss.uuuuuu goid [chan@]file:line marker -| Field | Description | -|-----------------|---------------------------------------------------------------------------------------------------------------------------| -| L | A single character, representing the [log level](logging.html#logging-levels) (e.g., `I` for `INFO`). | -| yy | The year (zero padded; i.e., 2016 is `16`). | -| mm | The month (zero padded; i.e., May is `05`). | -| dd | The day (zero padded). | -| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | -| goid | The goroutine id (omitted if zero for use by tests). | -| chan | The channel number (omitted if zero for backward compatibility). | -| file | The file name where the entry originated. | -| line | The line number where the entry originated. | -| marker | Redactability marker ` + redactableIndicator + ` (see below for details). | +| Field | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------| +| L | A single character, representing the [log level](logging.html#logging-levels-severities) (e.g., `I` for `INFO`). | +| yy | The year (zero padded; i.e., 2016 is `16`). | +| mm | The month (zero padded; i.e., May is `05`). | +| dd | The day (zero padded). | +| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | +| goid | The goroutine id (omitted if zero for use by tests). | +| chan | The channel number (omitted if zero for backward compatibility). | +| file | The file name where the entry originated. | +| line | The line number where the entry originated. | +| marker | Redactability marker ` + redactableIndicator + ` (see below for details). | The redactability marker can be empty; in this case, its position in the common prefix is a double ASCII space character which can be used to reliably identify this situation. @@ -142,18 +142,18 @@ Each line of output starts with the following prefix: Lyymmdd hh:mm:ss.uuuuuu goid [chan@]file:line marker tags counter -| Field | Description | -|-----------------|---------------------------------------------------------------------------------------------------------------------------| -| L | A single character, representing the [log level](logging.html#logging-levels) (e.g., `I` for `INFO`). | -| yy | The year (zero padded; i.e., 2016 is `16`). | -| mm | The month (zero padded; i.e., May is `05`). | -| dd | The day (zero padded). | -| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | -| goid | The goroutine id (omitted if zero for use by tests). | -| chan | The channel number (omitted if zero for backward compatibility). | -| file | The file name where the entry originated. | -| line | The line number where the entry originated. | -| marker | Redactability marker ` + redactableIndicator + ` (see below for details). | +| Field | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------| +| L | A single character, representing the [log level](logging.html#logging-levels-severities) (e.g., `I` for `INFO`). | +| yy | The year (zero padded; i.e., 2016 is `16`). | +| mm | The month (zero padded; i.e., May is `05`). | +| dd | The day (zero padded). | +| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | +| goid | The goroutine id (omitted if zero for use by tests). | +| chan | The channel number (omitted if zero for backward compatibility). | +| file | The file name where the entry originated. | +| line | The line number where the entry originated. | +| marker | Redactability marker ` + redactableIndicator + ` (see below for details). | | tags | The logging tags, enclosed between `[` and `]`. May be absent. | | counter | The entry counter. Always present. | @@ -195,21 +195,21 @@ Each line of output starts with the following prefix: Lyymmdd hh:mm:ss.uuuuuu goid [chan@]file:line marker [tags...] counter cont -| Field | Description | -|-----------------|---------------------------------------------------------------------------------------------------------------------------| -| L | A single character, representing the [log level](logging.html#logging-levels) (e.g., `I` for `INFO`). | -| yy | The year (zero padded; i.e., 2016 is `16`). | -| mm | The month (zero padded; i.e., May is `05`). | -| dd | The day (zero padded). | -| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | -| goid | The goroutine id (zero when cannot be determined). | -| chan | The channel number (omitted if zero for backward compatibility). | -| file | The file name where the entry originated. Also see below. | -| line | The line number where the entry originated. | -| marker | Redactability marker "⋮" (see below for details). | -| tags | The logging tags, enclosed between `[` and `]`. See below. | -| counter | The optional entry counter (see below for details). | -| cont | Continuation mark for structured and multi-line entries. See below. | +| Field | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------| +| L | A single character, representing the [log level](logging.html#logging-levels-severities) (e.g., `I` for `INFO`). | +| yy | The year (zero padded; i.e., 2016 is `16`). | +| mm | The month (zero padded; i.e., May is `05`). | +| dd | The day (zero padded). | +| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | +| goid | The goroutine id (zero when cannot be determined). | +| chan | The channel number (omitted if zero for backward compatibility). | +| file | The file name where the entry originated. Also see below. | +| line | The line number where the entry originated. | +| marker | Redactability marker "⋮" (see below for details). | +| tags | The logging tags, enclosed between `[` and `]`. See below. | +| counter | The optional entry counter (see below for details). | +| cont | Continuation mark for structured and multi-line entries. See below. | The `chan@` prefix before the file name indicates the logging channel, and is omitted if the channel is `DEV`. diff --git a/docs/generated/logsinks.md b/docs/generated/logsinks.md index 198f7820ba94..6a00351289e0 100644 --- a/docs/generated/logsinks.md +++ b/docs/generated/logsinks.md @@ -138,7 +138,7 @@ For example: The default output format for Fluent sinks is `json-fluent-compact`. The `fluent` variants of the JSON formats include a `tag` field as required by the Fluentd protocol, which -the non-`fluent` JSON [format variants](logformats.html) do not include. +the non-`fluent` JSON [format variants](log-formats.html) do not include. {{site.data.alerts.callout_info}} Run `cockroach debug check-log-config` to verify the effect of defaults inheritance. diff --git a/pkg/util/log/format_crdb_v1.go b/pkg/util/log/format_crdb_v1.go index 49961bda7a30..3a368868a887 100644 --- a/pkg/util/log/format_crdb_v1.go +++ b/pkg/util/log/format_crdb_v1.go @@ -128,18 +128,18 @@ Each line of output starts with the following prefix: buf.WriteString(` -| Field | Description | -|-----------------|---------------------------------------------------------------------------------------------------------------------------| -| L | A single character, representing the [log level](logging.html#logging-levels) (e.g., ` + "`I`" + ` for ` + "`INFO`" + `). | -| yy | The year (zero padded; i.e., 2016 is ` + "`16`" + `). | -| mm | The month (zero padded; i.e., May is ` + "`05`" + `). | -| dd | The day (zero padded). | -| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | -| goid | The goroutine id (omitted if zero for use by tests). | -| chan | The channel number (omitted if zero for backward compatibility). | -| file | The file name where the entry originated. | -| line | The line number where the entry originated. | -| marker | Redactability marker ` + "` + redactableIndicator + `" + ` (see below for details). |`) +| Field | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------| +| L | A single character, representing the [log level](logging.html#logging-levels-severities) (e.g., ` + "`I`" + ` for ` + "`INFO`" + `). | +| yy | The year (zero padded; i.e., 2016 is ` + "`16`" + `). | +| mm | The month (zero padded; i.e., May is ` + "`05`" + `). | +| dd | The day (zero padded). | +| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | +| goid | The goroutine id (omitted if zero for use by tests). | +| chan | The channel number (omitted if zero for backward compatibility). | +| file | The file name where the entry originated. | +| line | The line number where the entry originated. | +| marker | Redactability marker ` + "` + redactableIndicator + `" + ` (see below for details). |`) if withCounter { buf.WriteString(` diff --git a/pkg/util/log/format_crdb_v2.go b/pkg/util/log/format_crdb_v2.go index a11086eefc33..af4833c4dba0 100644 --- a/pkg/util/log/format_crdb_v2.go +++ b/pkg/util/log/format_crdb_v2.go @@ -46,21 +46,21 @@ Each line of output starts with the following prefix: Lyymmdd hh:mm:ss.uuuuuu goid [chan@]file:line marker [tags...] counter cont -| Field | Description | -|-----------------|---------------------------------------------------------------------------------------------------------------------------| -| L | A single character, representing the [log level](logging.html#logging-levels) (e.g., ` + "`I`" + ` for ` + "`INFO`" + `). | -| yy | The year (zero padded; i.e., 2016 is ` + "`16`" + `). | -| mm | The month (zero padded; i.e., May is ` + "`05`" + `). | -| dd | The day (zero padded). | -| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | -| goid | The goroutine id (zero when cannot be determined). | -| chan | The channel number (omitted if zero for backward compatibility). | -| file | The file name where the entry originated. Also see below. | -| line | The line number where the entry originated. | -| marker | Redactability marker "` + redactableIndicator + `" (see below for details). | -| tags | The logging tags, enclosed between ` + "`[`" + ` and ` + "`]`" + `. See below. | -| counter | The optional entry counter (see below for details). | -| cont | Continuation mark for structured and multi-line entries. See below. | +| Field | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------------------------| +| L | A single character, representing the [log level](logging.html#logging-levels-severities) (e.g., ` + "`I`" + ` for ` + "`INFO`" + `). | +| yy | The year (zero padded; i.e., 2016 is ` + "`16`" + `). | +| mm | The month (zero padded; i.e., May is ` + "`05`" + `). | +| dd | The day (zero padded). | +| hh:mm:ss.uuuuuu | Time in hours, minutes and fractional seconds. Timezone is UTC. | +| goid | The goroutine id (zero when cannot be determined). | +| chan | The channel number (omitted if zero for backward compatibility). | +| file | The file name where the entry originated. Also see below. | +| line | The line number where the entry originated. | +| marker | Redactability marker "` + redactableIndicator + `" (see below for details). | +| tags | The logging tags, enclosed between ` + "`[`" + ` and ` + "`]`" + `. See below. | +| counter | The optional entry counter (see below for details). | +| cont | Continuation mark for structured and multi-line entries. See below. | The ` + "`chan@`" + ` prefix before the file name indicates the logging channel, and is omitted if the channel is ` + "`DEV`" + `. diff --git a/pkg/util/log/logconfig/config.go b/pkg/util/log/logconfig/config.go index 932bf5c57934..5d2d6ef3b515 100644 --- a/pkg/util/log/logconfig/config.go +++ b/pkg/util/log/logconfig/config.go @@ -280,7 +280,7 @@ type FluentDefaults struct { // The default output format for Fluent sinks is // `json-fluent-compact`. The `fluent` variants of the JSON formats // include a `tag` field as required by the Fluentd protocol, which -// the non-`fluent` JSON [format variants](logformats.html) do not include. +// the non-`fluent` JSON [format variants](log-formats.html) do not include. // // {{site.data.alerts.callout_info}} // Run `cockroach debug check-log-config` to verify the effect of defaults inheritance.