Commit a6f6c7f
committed
Fix log file growing to 2x configured cap
log_written tracked bytes since last rotation, not actual file size.
After open_log(), the file could already hold log_max_size bytes but
log_written started at 0, so another log_max_size was written before
rotation triggered. Initialize log_written from the fd position after
rotate_log() so the counter reflects reality.1 parent 16b005c commit a6f6c7f
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments