-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* singlog node log * update configs * fix dan and doodle * fix dan3 * dan4 * fix dan5
- Loading branch information
Showing
6 changed files
with
77 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...ual-EN/3.build-develop-and-administration/3.configurations/8.single-node-log.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Logs | ||
|
||
**Nebula Graph** uses [glog](https://github.com/google/glog) to print logs, uses [gflag](https://gflags.github.io/gflags/) to control the severity level of the log, and provides an HTTP interface to dynamically change the log level at runtime to facilitate tracking. | ||
|
||
## Log Directory | ||
|
||
The default log directory is `/usr/local/nebula/logs/`. | ||
|
||
**Note:** If you deleted the log directory during runtime, the runtime log would not continue to be printed. However, this operation will not affect the services. Restart the services to recover the logs. | ||
|
||
## Parameter Description | ||
|
||
### Two most commonly used flags in glog | ||
|
||
- minloglevel: The scale of minloglevel is 0-4. The numbers of severity levels INFO(DEBUG), WARNING, ERROR, and FATAL are 0, 1, 2, and 3, respectively. Usually specified as 0 for debug, 1 for production. If you set the minloglevel to 4, no logs are printed. | ||
- v: The scale of v is 0-3. When the value is set to 0, you can further set the severity level of the debug log. The greater the value is, the more detailed the log is. | ||
|
||
### Configuration Files | ||
|
||
The default severity level for the metad, graphd, and storaged logs can be found in the configuration files (usually in `/usr/local/nebula/etc/`). | ||
|
||
## Check and Change the Severity Levels Dynamically | ||
|
||
Check all the flag values (log values included) of the current gflags with the following command. `curl` is only available when the `local_config` parameter is set to `true`. | ||
|
||
```bash | ||
> curl ${ws_ip}:${ws_port}/get_flags | ||
``` | ||
|
||
In the command: | ||
|
||
- `ws_ip` is the IP address for the HTTP service, which can be found in the configuration files above. The default value is 127.0.0.1. | ||
- `ws_port` is the port for the HTTP service, the default values for `metad`, `storaged`, and `graphd` are 11000, 12000,and 13000, respectively. | ||
|
||
For example, check the minloglevel for the `storaged` service: | ||
|
||
```bash | ||
> curl 127.0.0.1:12000/get_flags | grep minloglevel | ||
``` | ||
|
||
You can also change the logs' severity level to **the most detailed** with the following command. | ||
|
||
```bash | ||
> curl "http://127.0.0.1:12000/set_flags?flag=v&value=4" | ||
> curl "http://127.0.0.1:12000/set_flags?flag=minloglevel&value=0" | ||
``` | ||
|
||
In the Nebula console, check the severity minloglevel of graphd and set it to **the most detailed** with the following commands. | ||
|
||
```ngql | ||
nebula> GET CONFIGS graph:minloglevel; | ||
nebula> UPDATE CONFIGS graph:minloglevel=0; | ||
``` | ||
|
||
To change the severity of the storage log, replace the `graph` in the preceding command with `storage`. | ||
|
||
**Note:** **Nebula Graph** only supports modifying the graph and storage log severity by using console. And the severity level of meta logs can only be modified with the `curl` command. | ||
|
||
**Close** all logs print (FATAL only) with the following command. | ||
|
||
```bash | ||
> curl "http://127.0.0.1:12000/set_flags?flag=minloglevel&value=4" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters