From f6c9da7eb9abaac67731a37bfab04096f3ed1553 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Wed, 25 Sep 2024 11:28:46 +0900 Subject: [PATCH 1/6] system_config: add path attribute in system/log section This feature was introduced at https://github.com/fluent/fluentd/pull/4604 Signed-off-by: Shizuo Fujita --- deployment/system-config.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deployment/system-config.md b/deployment/system-config.md index 2ac7dce0..0251cd9c 100644 --- a/deployment/system-config.md +++ b/deployment/system-config.md @@ -174,6 +174,14 @@ Enable JIT for worker processes. Internally, this configuration enables Ruby's ` ### `` section +#### `path` + +| type | default | version | +| :--- | :--- | :--- | +| string | nil | 1.18.0 | + +Specifies the log file path. + #### `format` | type | default | version | From 143863c599079892f0139d95293f0d8c77c09f56 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 27 Sep 2024 08:53:54 +0900 Subject: [PATCH 2/6] logging: add 'By Config File' section for log path configuration Signed-off-by: Shizuo Fujita --- deployment/logging.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/deployment/logging.md b/deployment/logging.md index 3e400073..617f54c8 100644 --- a/deployment/logging.md +++ b/deployment/logging.md @@ -148,12 +148,28 @@ end ## Output to Log File +### By Command Line Option + By default, Fluentd outputs to the standard output. Use `-o` command line option to specify the file instead: ```text $ fluentd -o /path/to/log_file ``` +### By Config File + +You can also configure the log file path using the `` directive under ``: + +```text + + + path /path/to/log_file + + + +$ fluentd -o /path/to/log_file +``` + ### Log Rotation Setting By default, Fluentd does not rotate log files. You can configure this behavior via system-config after v1.13.0. From 75c3ec002519ee3a6290f7c486fa83c33f8f4b73 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 27 Sep 2024 08:56:07 +0900 Subject: [PATCH 3/6] logging: fix section level in 'Log Rotation Setting' Signed-off-by: Shizuo Fujita --- deployment/logging.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/logging.md b/deployment/logging.md index 617f54c8..1c618cfa 100644 --- a/deployment/logging.md +++ b/deployment/logging.md @@ -170,7 +170,7 @@ You can also configure the log file path using the `` directive under ` Date: Fri, 27 Sep 2024 10:52:45 +0900 Subject: [PATCH 4/6] system_config: add link to logging page Co-authored-by: Daijiro Fukuda Signed-off-by: Shizuo Fujita --- deployment/system-config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment/system-config.md b/deployment/system-config.md index 0251cd9c..e014f5d1 100644 --- a/deployment/system-config.md +++ b/deployment/system-config.md @@ -182,6 +182,8 @@ Enable JIT for worker processes. Internally, this configuration enables Ruby's ` Specifies the log file path. +Please see also [Output to Log File](logging.md#output-to-log-file). + #### `format` | type | default | version | From 9a11fa6f751805fcc93f759cb29600e549c12af4 Mon Sep 17 00:00:00 2001 From: Watson Date: Fri, 27 Sep 2024 10:53:25 +0900 Subject: [PATCH 5/6] logging: remove unnecessary command line Co-authored-by: Daijiro Fukuda Signed-off-by: Shizuo Fujita --- deployment/logging.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/deployment/logging.md b/deployment/logging.md index 1c618cfa..23f853d1 100644 --- a/deployment/logging.md +++ b/deployment/logging.md @@ -166,8 +166,6 @@ You can also configure the log file path using the `` directive under ` - -$ fluentd -o /path/to/log_file ``` ## Log Rotation Setting From 1d7ab8d8c8aedc0647c4df3be77c0fdde7ca7fdf Mon Sep 17 00:00:00 2001 From: Watson Date: Fri, 27 Sep 2024 10:53:52 +0900 Subject: [PATCH 6/6] logging: add introduced version Co-authored-by: Daijiro Fukuda Signed-off-by: Shizuo Fujita --- deployment/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/logging.md b/deployment/logging.md index 23f853d1..742fd007 100644 --- a/deployment/logging.md +++ b/deployment/logging.md @@ -158,7 +158,7 @@ $ fluentd -o /path/to/log_file ### By Config File -You can also configure the log file path using the `` directive under ``: +Since v1.18.0, You can also configure the log file path using the `` directive under ``: ```text