Logging to disk without FS overflow

If you are using Luci System -> System -> Logging -> Log Buffer Size setting doesn't appear to set config/system's log_buffer_size, but instead it sets log_size

When log_file and log_size are set, then a file is written to the maximum size set in log_size. When it reaches that size, it is renamed to log_file.old (the previous log_file.old, if present, is deleted first) and a new log_file is created. So the maximum written will be log_size x 2.

If you are redirecting the log to a persistent file, I highly recommend it not be to somewhere located on the device's internal flash. That will cause a low-level of constant writes to your flash. In some cases, there are realistic error conditions that can occur on the device that can cause a megabyte or more a day to be written to the log. This can cause significant wear to a device's irreplaceable internal flash.