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

timestamp_in_logfile_name and logrotate faq #1400

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion docs-2.0/20.appendix/0.FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 版本

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 配置

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 配置

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 配置

Expand Down