From e2cc36559cdeeca36389acf8f0a3951961015aaf Mon Sep 17 00:00:00 2001 From: randomJoe211 <69501902+randomJoe211@users.noreply.github.com> Date: Mon, 17 Jan 2022 18:55:33 +0800 Subject: [PATCH] timestamp_in_logfile_name and logrotate faq --- docs-2.0/20.appendix/0.FAQ.md | 5 ++++- .../1.configurations/2.meta-config.md | 1 + .../1.configurations/3.graph-config.md | 1 + .../1.configurations/4.storage-config.md | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs-2.0/20.appendix/0.FAQ.md b/docs-2.0/20.appendix/0.FAQ.md index 7c2fe9f2919..42b17e68697 100644 --- a/docs-2.0/20.appendix/0.FAQ.md +++ b/docs-2.0/20.appendix/0.FAQ.md @@ -300,7 +300,10 @@ nebula > MATCH (s)<-[e]-() WHERE id(s) == "given" RETURN count(e); #入度 Nebula Graph 的日志默认在 `/usr/local/nebula/logs/` 下,正常 INFO 级别日志文件为 `nebula-graphd.INFO, nebula-storaged.INFO, nebula-metad.INFO`,报警和错误级别后缀为 `.WARNING` 和 `.ERROR`。 -Nebula Graph 使用 [glog](https://github.com/google/glog) 打印日志。glog 没有日志回收的功能,用户可以使用 crontab 设置定期任务回收日志文件,详情请参见 [Glog should delete old log files automatically](https://github.com/google/glog/issues/423)。 +Nebula Graph 使用 [glog](https://github.com/google/glog) 打印日志。glog 没有日志回收的功能,用户可以: + +- 使用 crontab 设置定期任务回收日志文件,详情请参见 [Glog should delete old log files automatically](https://github.com/google/glog/issues/423)。 +- 使用 [logrotate](https://github.com/logrotate/logrotate) 实现日志轮询。使用 logrotate 管理日志前需修改相应 Nebula Graph 服务的配置,将`timestamp_in_logfile_name`参数的值改成`false`。 ### 如何查看 Nebula Graph 版本 diff --git a/docs-2.0/5.configurations-and-logs/1.configurations/2.meta-config.md b/docs-2.0/5.configurations-and-logs/1.configurations/2.meta-config.md index dcfdd6b5c5b..b5b04e5319f 100644 --- a/docs-2.0/5.configurations-and-logs/1.configurations/2.meta-config.md +++ b/docs-2.0/5.configurations-and-logs/1.configurations/2.meta-config.md @@ -42,6 +42,7 @@ Meta 服务提供了两份初始配置文件`nebula-metad.conf.default`和`nebul |`stdout_log_file` |`metad-stdout.log` | 标准输出日志文件名称。 | |`stderr_log_file` |`metad-stderr.log` | 标准错误日志文件名称。 | |`stderrthreshold` | `2` | 要复制到标准错误中的最小日志级别(`minloglevel`)。 | +| `timestamp_in_logfile_name` | `true` | 日志文件名称中是否包含时间戳。`true`表示包含,`false`表示不包含。 | ## networking 配置 diff --git a/docs-2.0/5.configurations-and-logs/1.configurations/3.graph-config.md b/docs-2.0/5.configurations-and-logs/1.configurations/3.graph-config.md index d9978d65f6f..55a1bb8c823 100644 --- a/docs-2.0/5.configurations-and-logs/1.configurations/3.graph-config.md +++ b/docs-2.0/5.configurations-and-logs/1.configurations/3.graph-config.md @@ -44,6 +44,7 @@ Graph 服务提供了两份初始配置文件`nebula-graphd.conf.default`和`neb |`stdout_log_file` |`graphd-stdout.log` | 标准输出日志文件名称。 | |`stderr_log_file` |`graphd-stderr.log` | 标准错误日志文件名称。 | |`stderrthreshold` | `2` | 要复制到标准错误中的最小日志级别(`minloglevel`)。 | +| `timestamp_in_logfile_name` | `true` | 日志文件名称中是否包含时间戳。`true`表示包含,`false`表示不包含。 | ## query 配置 diff --git a/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md b/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md index 65092b71cdf..1e21b574722 100644 --- a/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md +++ b/docs-2.0/5.configurations-and-logs/1.configurations/4.storage-config.md @@ -47,6 +47,7 @@ Storage 服务提供了两份初始配置文件`nebula-storaged.conf.default`和 |`stdout_log_file` |`storaged-stdout.log` | 标准输出日志文件名称。 | |`stderr_log_file` |`storaged-stderr.log` | 标准错误日志文件名称。 | |`stderrthreshold` | `2` | 要复制到标准错误中的最小日志级别(`minloglevel`)。 | +| `timestamp_in_logfile_name` | `true` | 日志文件名称中是否包含时间戳。`true`表示包含,`false`表示不包含。 | ## networking 配置