From 8358ca9e05fc96038fd4af4588f267b3b86e4ff5 Mon Sep 17 00:00:00 2001 From: Ririsoft Date: Wed, 12 Jun 2024 18:36:45 +0200 Subject: [PATCH] add documentation for output file log mode option --- src/docs/markdown/caddyfile/directives/log.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/docs/markdown/caddyfile/directives/log.md b/src/docs/markdown/caddyfile/directives/log.md index a560fd4..59e89de 100644 --- a/src/docs/markdown/caddyfile/directives/log.md +++ b/src/docs/markdown/caddyfile/directives/log.md @@ -129,8 +129,16 @@ A file. By default, log files are rotated ("rolled") to prevent disk space exhau Log rolling is provided by [lumberjack ](https://github.com/natefinch/lumberjack) + + ```caddy-d output file { + mode roll_disabled roll_size roll_uncompressed @@ -142,6 +150,10 @@ output file { - **<filename>** 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`.