mod_log_ringbuffer/mod_log_ringbuffer.lua
changeset 4219 86f8ece24029
parent 4209 481c4d75e77d
child 4222 f917bb78ab67
equal deleted inserted replaced
4218:5841d54cb6c6 4219: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)