Skip to content

Commit

Permalink
Backport of Fix docs for log file name changes into release/1.16.x (#…
Browse files Browse the repository at this point in the history
…18977)

* backport of commit 541633c

* Fix docs for log file name changes (#18913)

* fix docs

* Update website/content/docs/agent/config/cli-flags.mdx

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

* Update website/content/docs/agent/config/cli-flags.mdx

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

* Update website/content/docs/agent/config/cli-flags.mdx

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: absolutelightning <ashesh.vidyut@hashicorp.com>
Co-authored-by: Ashesh Vidyut <134911583+absolutelightning@users.noreply.github.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 22, 2023
1 parent ddc6f15 commit a6a8312
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions website/content/docs/agent/config/cli-flags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,15 @@ information.
## Log Options

- `-log-file` ((#\_log_file)) - writes all the Consul agent log messages
to a file. This value is used as a prefix for the log file name. The current timestamp
is appended to the file name. If the value ends in a path separator, `consul-`
to a file at the path indicated by this flag. The filename defaults to `consul.log`.
When the log file rotates, this value is used as a prefix for the path to the log and the current timestamp is
appended to the file name. If the value ends in a path separator, `consul-`
will be appended to the value. If the file name is missing an extension, `.log`
is appended. For example, setting `log-file` to `/var/log/` would result in a log
file path of `/var/log/consul-{timestamp}.log`. `log-file` can be combined with
[`-log-rotate-bytes`](#_log_rotate_bytes) and [-log-rotate-duration](#_log_rotate_duration)
for a fine-grained log rotation experience.
file path of `/var/log/consul.log`. `log-file` can be combined with
[`-log-rotate-bytes`](#_log_rotate_bytes) and [`-log-rotate-duration`](#_log_rotate_duration)
for a fine-grained log rotation experience. After rotation, the path and filename take the following form:
`/var/log/consul-{timestamp}.log`

- `-log-rotate-bytes` ((#\_log_rotate_bytes)) - to specify the number of
bytes that should be written to a log before it needs to be rotated. Unless specified,
Expand Down

0 comments on commit a6a8312

Please sign in to comment.