1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

corrections based on kozlovic comments

- use logfile_size_limit
This commit is contained in:
ainsley 2020-02-03 16:34:37 -06:00
parent e602d39fd7
commit 2f0d0bf4d4

View File

@ -64,13 +64,13 @@ All of these settings are available in the configuration file as well.
debug: false debug: false
trace: true trace: true
logtime: false logtime: false
log_size_limit: 1GB logfile_size_limit: 1GB
log_file: "/tmp/nats-server.log" log_file: "/tmp/nats-server.log"
``` ```
### Log Rotation ### Log Rotation
Introduced in NATS Server v2.1.4, NATS allows for auto-rotation of log files when the size is greater than the configured limit. The backup files will have the same name as the original log file with the suffix .yyyy.mm.dd.hh.mm.ss.micros. Introduced in NATS Server v2.1.4, NATS allows for auto-rotation of log files when the size is greater than the configured limit set in `logfile_size_limit`. The backup files will have the same name as the original log file with the suffix .yyyy.mm.dd.hh.mm.ss.micros.
You can also use NATS-included mechanisms with [logrotate](https://github.com/logrotate/logrotate), a simple standard Linux utility to rotate logs available on most distributions like Debian, Ubuntu, RedHat \(CentOS\), etc., to make log rotation simple. You can also use NATS-included mechanisms with [logrotate](https://github.com/logrotate/logrotate), a simple standard Linux utility to rotate logs available on most distributions like Debian, Ubuntu, RedHat \(CentOS\), etc., to make log rotation simple.