Skip to content

Commit 1e7258f

Browse files
authored
Merge pull request #791 from OverActiveBladderSystem/patch-1
OABS Update logging-reference.md
2 parents e783ee4 + 85ee5a0 commit 1e7258f

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

docs/troubleshooting/logging-reference.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,51 @@ Chia blockchain nodes consist of several components that each handle different a
1010

1111
## Log file Location:
1212

13-
| OS | Location |
14-
| ------- | ----------------------------------------------------------------------------- |
15-
| Linux | `~/.chia/mainnet/log/debug.log` |
16-
| Windows | `$env:USERPROFILE\.chia\mainnet\log\debug.log` (`C:\Users\<username>\.chia…`) |
17-
| MacOS | `$HOME/.chia/mainnet/log/debug.log` (`/Users/<username>/.chia…`) |
13+
| OS | Location |
14+
| ------- | ---------------------------------------------------------------- |
15+
| Linux | `~/.chia/mainnet/log/debug.log` |
16+
| Windows | `$env:USERPROFILE\.chia\mainnet\log\debug.log` |
17+
| Windows | `C:\Users\<username>\.chia\mainnet\log\debug.log` |
18+
| MacOS | `$HOME/.chia/mainnet/log/debug.log` (`/Users/<username>/.chia…`) |
1819

1920
## Log File Management:
2021

21-
By default, Chia allows debug.log to grow to 20MB, and then rotates the file by closing debug.log, renaming it to debug.log.1, and renames any existing older log files to debug.log.x, to a maximum of 7 old log files. If a log rotation is required and all 7 old log files exist, the oldest log file is overwritten with the next earliest file; resulting in a maximum of 160MB of the most recent messages being stored.
22+
By default, the Chia `debug.log` grows to what is set in `config.yaml` (log_maxbytesrotation: 52428800), then rotates the file by closing `debug.log`, renaming it to `debug.log.1`, and renames any existing older log files to `debug.log.x`, to a maximum of 7 old log files (log_maxfilesrotation: 7). If a log rotation is required and all 7 old log files exist, the oldest log file is overwritten with the next earliest file; resulting in roughly 420MB of the most recent log messages being stored.
2223

2324
## Log Detail Level:
2425

25-
Chia is shipped with the debug.log only containing messages at the WARN or ERROR level. Many of the messages needed to fully monitor a node are only visible at the INFO level. Changes to the logging level can be done in the `config.yaml` file in the `mainnet/config` folder.
26+
Chia is shipped with the `debug.log` set to record messages at the `ERROR` and `WARN` levels. Many of the messages needed to fully monitor a node are only visible at the `INFO` level. Changes to the logging level can be done in the `config.yaml` file located in the `/.chia/mainnet/config` folder.
27+
28+
| Log Level | Messages Logged |
29+
| --------- | ------------------------ |
30+
| ERROR | ERROR |
31+
| WARN | ERROR, WARN |
32+
| INFO | ERROR, WARN, INFO |
33+
| DEBUG | ERROR, WARN, INFO, DEBUG |
2634

2735
## Change the Log Level Output:
2836

29-
You are looking for the first reference to logging in the file that looks like this:
37+
When editing files you should use a plain text editor with word wrap disabled to preserve the yaml format.
38+
39+
You are looking for the first reference to logging in the `config.yaml` file that looks like this (older files may be missing some lines):
3040

3141
```
32-
farmer:
3342
logging: &id001
43+
log_backcompat: false
3444
log_filename: log/debug.log
3545
log_level: WARN
46+
log_maxbytesrotation: 52428800
47+
log_maxfilesrotation: 7
3648
log_stdout: false
49+
log_syslog: false
50+
log_syslog_host: localhost
51+
log_syslog_port: 514
52+
log_use_gzip: false
3753
```
3854

39-
Change the `log_level` to `INFO`, save the file, and restart the node.
55+
Change the `log_level` from `WARN` to `INFO`, save the file, and restart the node.
56+
57+
Your options for log levels are `ERROR`, `WARN`, `INFO`, and `DEBUG`.
4058

4159
## Node Components:
4260

0 commit comments

Comments
 (0)