Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation for output file log mode option #399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/docs/markdown/caddyfile/directives/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,16 @@ A file. By default, log files are rotated ("rolled") to prevent disk space exhau

Log rolling is provided by [lumberjack <img src="/old/resources/images/external-link.svg" class="external-link">](https://github.com/natefinch/lumberjack)

<aside class="tip">

**A note about reloading log file options:** A server restart is required to apply configuration changes to a given output file.
The changes will not be applied at server reload time, unless you add a new log filename.

</aside>

```caddy-d
output file <filename> {
mode <mode>
roll_disabled
roll_size <size>
roll_uncompressed
Expand All @@ -142,6 +150,10 @@ output file <filename> {

- **&lt;filename&gt;** is the path to the log file.

- **mode** is the file mode octal value as specified with the unix `chmod` command. For example `0600` would set the mode to `rw-,---,---`, while `0640` would set the mode to `rw-,r--,---`.

Default: `0600`

- **roll_disabled** disables log rolling. This can lead to disk space depletion, so only use this if your log files are maintained some other way.

- **roll_size** is the size at which to roll the log file. The current implementation supports megabyte resolution; fractional values are rounded up to the next whole megabyte. For example, `1.1MiB` is rounded up to `2MiB`.
Expand Down