Skip to content

Commit

Permalink
[DOC-304] Update examples for disabling logging using --log-dir (#18073)
Browse files Browse the repository at this point in the history
* [DOC-304] Update examples for disabling logging using --log-dir

Main changes in 22.2+
Specific mentions of --log-dir="" have been updated to use --log-dir= across all versions

Co-authored-by: Florence Morris <[email protected]>
  • Loading branch information
mdlinville and florence-crl authored Nov 15, 2023
1 parent a5046bf commit f3074ab
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/current/_includes/releases/v1.0/beta-20170105.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Raft traffic to that node is suspended until it becomes responsive again. [#1263
- Fixed a regression in `OUTER JOIN` operations with predicates. [#12350](https://github.com/cockroachdb/cockroach/pull/12350)
- Fixed type checking in `window` definitions. [#12483](https://github.com/cockroachdb/cockroach/pull/12483)
- Fixed a bug when adding columns with families to tables created by certain older beta versions of CockroachDB. [#12475](https://github.com/cockroachdb/cockroach/pull/12475)
- It is now possible to disable logging output to files with `--log-dir=""`. [#12662](https://github.com/cockroachdb/cockroach/pull/12662)
- It is now possible to disable logging output to files with `--log-dir=`. [#12662](https://github.com/cockroachdb/cockroach/pull/12662)
- When logging to both `stderr` and files, all desired logging output is now properly emitted to files, not only to `stderr`. [#12662](https://github.com/cockroachdb/cockroach/pull/12662)

<h3 id="beta-20170105-internal-changes">Internal Changes</h3>
Expand Down Expand Up @@ -88,4 +88,4 @@ This release includes 122 merged PRs by 25 authors. We would like to thank the f

- Haines Chan

</div>
</div>
2 changes: 1 addition & 1 deletion src/current/_includes/releases/v19.2/v19.2.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $ docker pull cockroachdb/cockroach:v19.2.6
- Accesses to `/health` using a non-root authentication token no longer hang when a node is currently under load, or if a system range is unavailable. [#46477][#46477]
- Fixed a race in the vectorized execution engine. [#46486][#46486]
- The `cockroach debug zip` command now properly collects heap profiles. [#46482][#46482]
- The goroutine dump facility now functions properly when logging to files is disabled, e.g., via `--log-dir=""` or `--logtostderr`. [#46482][#46482]
- The goroutine dump facility now functions properly when logging to files is disabled, e.g., via `--log-dir=` or `--logtostderr`. [#46482][#46482]
- Fixed a bug where the vectorized engine could sometimes give an incorrect result when reading from interleaved parents or children. [#46495][#46495]
- Fixed an internal error that could occur when an aggregate inside the right-hand side of a `LATERAL` join was scoped at the level of the left-hand side. [#46544][#46544]
- Fixed an error that incorrectly occurred when an aggregate was used inside the `WHERE` or `ON` clause of a [subquery](https://www.cockroachlabs.com/docs/v19.2/subqueries) but was scoped at an outer level of the query. [#46544][#46544]
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/releases/v20.1/v20.1.0-rc.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $ docker pull cockroachdb/cockroach-unstable:v20.1.0-rc.1
- Fixed incorrect query results in some corner cases involving variance/stddev/corr. [#46436][#46436]
- Fixed an internal error or incorrect evaluation of check constraints in certain cases involving `UPSERT` and foreign key checks. [#46409][#46409]
- `cockroach debug zip` now properly collects heap profiles. [#46469][#46469]
- The goroutine dump facility now functions properly when logging to files is disabled, e.g., via `--log-dir=""` or `--logtostderr`. [#46469][#46469]
- The goroutine dump facility now functions properly when logging to files is disabled, e.g., via `--log-dir=` or `--logtostderr`. [#46469][#46469]
- Fixed an internal error that could occur during planning for some queries with a join and negative `LIMIT`. [#46440][#46440]
- Fixed a bug where the vectorized engine could sometimes give an incorrect result when reading from interleaved parents or children. [#46456][#46456]
- Fixed a bug where the vectorized engine would throw an internal error when executing a query that utilized an inverted index. [#46267][#46267]
Expand Down
4 changes: 2 additions & 2 deletions src/current/_includes/v1.0/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
`--logtostderr` | Enable logging to `stderr` for messages at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--logtostderr=ERROR`<br/><br/>If you use this flag without specifying the severity level (e.g., `cockroach start --logtostderr`), it prints messages of *all* severities to `stderr`.<br/><br/>Setting `--logtostderr=NONE` disables logging to `stderr`.
`--no-color` | Do not colorize `stderr`. Possible values: `true` or `false`.<br/><br/>When set to `false`, messages logged to `stderr` are colorized based on [severity level](debug-and-error-logs.html#severity-levels). <br><br>**Default:** `false`
`--no-color` | Do not colorize `stderr`. Possible values: `true` or `false`.<br/><br/>When set to `false`, messages logged to `stderr` are colorized based on [severity level](debug-and-error-logs.html#severity-levels). <br><br>**Default:** `false`
4 changes: 2 additions & 2 deletions src/current/_includes/v1.1/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
`--logtostderr` | Enable logging to `stderr` for messages at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--logtostderr=ERROR`<br/><br/>If you use this flag without specifying the severity level (e.g., `cockroach start --logtostderr`), it prints messages of *all* severities to `stderr`.<br/><br/>Setting `--logtostderr=NONE` disables logging to `stderr`.
`--no-color` | Do not colorize `stderr`. Possible values: `true` or `false`.<br/><br/>When set to `false`, messages logged to `stderr` are colorized based on [severity level](debug-and-error-logs.html#severity-levels). <br><br>**Default:** `false`
`--no-color` | Do not colorize `stderr`. Possible values: `true` or `false`.<br/><br/>When set to `false`, messages logged to `stderr` are colorized based on [severity level](debug-and-error-logs.html#severity-levels). <br><br>**Default:** `false`
2 changes: 1 addition & 1 deletion src/current/_includes/v19.1/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v19.2/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v2.0/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v2.1/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v20.1/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | After the log directory reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-dir-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | Only writes messages to log files if they are at or above the specified [severity level](debug-and-error-logs.html#severity-levels), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v20.2/misc/logging-flags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flag | Description
-----|------------
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | Enable logging to files and write logs to the specified directory.<br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-dir-max-size` | **Deprecated.** Use `--log-group-max-size`.
`--log-group-max-size` | After the logging group (i.e., `cockroach`, `cockroach-sql-audit`, `cockroach-auth`, `cockroach-sql-exec`, `cockroach-pebble`, `cockroach-rocksdb`) reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-group-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
Expand Down
2 changes: 1 addition & 1 deletion src/current/_includes/v21.1/misc/logging-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Flag | Description
-----|------------
`--log` | **New in v21.1:** Configure logging parameters by specifying a YAML payload. For details, see [Configure logs](configure-logs.html#flag). If a YAML configuration is not specified, the [default configuration](configure-logs.html#default-logging-configuration) is used.<br/><br/>`--log-config-file` can also be used.<br/><br/>**Note:** The deprecated logging flags below cannot be combined with `--log`, and can be defined instead in the YAML payload.
`--log-config-file` | **New in v21.1:** Configure logging parameters by specifying a path to a YAML file. For details, see [Configure logs](configure-logs.html#flag). If a YAML configuration is not specified, the [default configuration](configure-logs.html#default-logging-configuration) is used.<br/><br/>`--log` can also be used.<br/><br/>**Note:** The deprecated logging flags below cannot be combined with `--log-config-file`, and can be defined instead in the YAML payload.
`--log-dir` | **Deprecated.** To enable logging to files and write logs to the specified directory, use [`--log`](configure-logs.html#flag) and set `dir` in the YAML configuration. <br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=""`) disables logging to files.
`--log-dir` | **Deprecated.** To enable logging to files and write logs to the specified directory, use [`--log`](configure-logs.html#flag) and set `dir` in the YAML configuration. <br/><br/>Setting `--log-dir` to a blank directory (`--log-dir=`) disables logging to files. Do not use `--log-dir=""`; this creates a new directory named `""` and stores log files in that directory.
`--log-group-max-size` | **Deprecated.** This is now configured with [`--log`](configure-logs.html#flag) or [`--log-config-file`](configure-logs.html#flag) and a YAML payload. After the logging group (i.e., `cockroach`, `cockroach-sql-audit`, `cockroach-auth`, `cockroach-sql-exec`, `cockroach-pebble`) reaches the specified size, delete the oldest log file. The flag's argument takes standard file sizes, such as `--log-group-max-size=1GiB`.<br/><br/>**Default**: 100MiB
`--log-file-max-size` | **Deprecated.** This is now configured with [`--log`](configure-logs.html#flag) or [`--log-config-file`](configure-logs.html#flag) and a YAML payload. After logs reach the specified size, begin writing logs to a new file. The flag's argument takes standard file sizes, such as `--log-file-max-size=2MiB`.<br/><br/>**Default**: 10MiB
`--log-file-verbosity` | **Deprecated.** This is now configured with [`--log`](configure-logs.html#flag) or [`--log-config-file`](configure-logs.html#flag) and a YAML payload. Only writes messages to log files if they are at or above the specified [severity level](logging.html#logging-levels-severities), such as `--log-file-verbosity=WARNING`. **Requires** logging to files.<br/><br/>**Default**: `INFO`
Expand Down
Loading

0 comments on commit f3074ab

Please sign in to comment.