mod_log_ringbuffer: Update default filename to include data path
authorMatthew Wild <mwild1@gmail.com>
Fri, 16 Oct 2020 14:25:44 +0100
changeset 4219 86f8ece24029
parent 4218 5841d54cb6c6
child 4220 35b678609b79
mod_log_ringbuffer: Update default filename to include data path
mod_log_ringbuffer/README.markdown
mod_log_ringbuffer/mod_log_ringbuffer.lua
--- a/mod_log_ringbuffer/README.markdown	Fri Oct 16 14:23:10 2020 +0100
+++ b/mod_log_ringbuffer/README.markdown	Fri Oct 16 14:25:44 2020 +0100
@@ -52,7 +52,8 @@
 
 `filename`
 :   The name of the file to dump logs to when triggered. The filename may
-    contain a number of variables, described below.
+    contain a number of variables, described below. Defaults to
+    `"{paths.data}/ringbuffer-logs-{pid}-{count}.log"`.
 
 Only one of the following triggers may be specified:
 
--- a/mod_log_ringbuffer/mod_log_ringbuffer.lua	Fri Oct 16 14:23:10 2020 +0100
+++ b/mod_log_ringbuffer/mod_log_ringbuffer.lua	Fri Oct 16 14:25:44 2020 +0100
@@ -10,7 +10,7 @@
 
 local os_date = os.date;
 
-local default_filename_template = "ringbuffer-logs-{pid}-{count}.log";
+local default_filename_template = "{paths.data}/ringbuffer-logs-{pid}-{count}.log";
 local render_filename = require "util.interpolation".new("%b{}", function (s) return s; end, {
 	yyyymmdd = function (t)
 		return os_date("%Y%m%d", t);