Skip to content

Commit

Permalink
timestamp_in_logfile_name and logrotate faq (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
randomJoe211 authored Jan 19, 2022
1 parent fbdf601 commit ee6fe7d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
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 @@ -296,7 +296,10 @@ Solution: Add the following configuration in the `profiles` scope of Maven's `se

By default, the logs of Nebula Graph are stored in `/usr/local/nebula/logs/`. The INFO level log files are `nebula-graphd.INFO, nebula-storaged.INFO, nebula-metad.INFO`. If an alarm or error occurs, the suffixes are modified as `.WARNING` or `.ERROR`.

Nebula Graph uses [glog](https://github.com/google/glog) to print logs. `glog` cannot recycle the outdated files. You can use crontab to delete them by yourself. For more information, see [`Glog should delete old log files automatically`](https://github.com/google/glog/issues/423).
Nebula Graph uses [glog](https://github.com/google/glog) to print logs. `glog` cannot recycle the outdated files. To rotate logs, you can:

- Use crontab to delete logs periodically. For more information, see [`Glog should delete old log files automatically`](https://github.com/google/glog/issues/423).
- Use [logrotate](https://github.com/logrotate/logrotate) to manage log files. Before using logrotate, modify the configurations of corresponding services and set `timestamp_in_logfile_name` to `false`.

### "How to check the Nebula Graph version?"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ For all parameters and their current values, see [Configurations](1.configuratio
|`stdout_log_file` |`metad-stdout.log` | Specifies the filename for the `stdout` log. |
|`stderr_log_file` |`metad-stderr.log` | Specifies the filename for the `stderr` log. |
|`stderrthreshold` | `2` | Specifies the `minloglevel` to be copied to the `stderr` log. |
| `timestamp_in_logfile_name` | `true` | Specifies if the log file name contains a timestamp. `true` indicates yes, `false` indicates no. |

## Networking configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ For all parameters and their current values, see [Configurations](1.configuratio
|`stdout_log_file` |`graphd-stdout.log` | Specifies the filename for the `stdout` log. |
|`stderr_log_file` |`graphd-stderr.log` | Specifies the filename for the `stderr` log. |
|`stderrthreshold` | `2` | Specifies the `minloglevel` to be copied to the `stderr` log. |
| `timestamp_in_logfile_name` | `true` | Specifies if the log file name contains a timestamp. `true` indicates yes, `false` indicates no. |

## Query configurations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ For all parameters and their current values, see [Configurations](1.configuratio
|`stdout_log_file` |`graphd-stdout.log` | Specifies the filename for the `stdout` log. |
|`stderr_log_file` |`graphd-stderr.log` | Specifies the filename for the `stderr` log. |
|`stderrthreshold` | `2` | Specifies the `minloglevel` to be copied to the `stderr` log. |
| `timestamp_in_logfile_name` | `true` | Specifies if the log file name contains a timestamp. `true` indicates yes, `false` indicates no. |

## Networking configurations

Expand Down

0 comments on commit ee6fe7d

Please sign in to comment.