comparison mod_log_ringbuffer/mod_log_ringbuffer.lua @ 4215:86f8ece24029

mod_log_ringbuffer: Update default filename to include data path
author Matthew Wild <mwild1@gmail.com>
date Fri, 16 Oct 2020 14:25:44 +0100
parents 481c4d75e77d
children f917bb78ab67
comparison
equal deleted inserted replaced
4214:5841d54cb6c6 4215:86f8ece24029
8 local default_timestamp = "%b %d %H:%M:%S "; 8 local default_timestamp = "%b %d %H:%M:%S ";
9 local max_chunk_size = module:get_option_number("log_ringbuffer_chunk_size", 16384); 9 local max_chunk_size = module:get_option_number("log_ringbuffer_chunk_size", 16384);
10 10
11 local os_date = os.date; 11 local os_date = os.date;
12 12
13 local default_filename_template = "ringbuffer-logs-{pid}-{count}.log"; 13 local default_filename_template = "{paths.data}/ringbuffer-logs-{pid}-{count}.log";
14 local render_filename = require "util.interpolation".new("%b{}", function (s) return s; end, { 14 local render_filename = require "util.interpolation".new("%b{}", function (s) return s; end, {
15 yyyymmdd = function (t) 15 yyyymmdd = function (t)
16 return os_date("%Y%m%d", t); 16 return os_date("%Y%m%d", t);
17 end; 17 end;
18 hhmmss = function (t) 18 hhmmss = function (t)