Comparison

mod_log_ringbuffer/README.markdown @ 5363:893b9c3c0d20

mod_log_ringbuffer: Fix description and examples of level configuration
author Matthew Wild <mwild1@gmail.com>
date Mon, 24 Apr 2023 17:11:08 +0100
parent 5362:c0493d3173c1
child 5876:133b23758cf6
comparison
equal deleted inserted replaced
5362:c0493d3173c1 5363:893b9c3c0d20
32 log = { 32 log = {
33 -- Log errors to a file 33 -- Log errors to a file
34 error = "/var/log/prosody/prosody.err"; 34 error = "/var/log/prosody/prosody.err";
35 35
36 -- Log debug and higher to a 2MB buffer 36 -- Log debug and higher to a 2MB buffer
37 { level = "debug", to = "ringbuffer", size = 1024*1024*2, filename_template = "debug-logs-{pid}-{count}.log", signal = "SIGUSR2" }; 37 { to = "ringbuffer", size = 1024*1024*2, filename_template = "debug-logs-{pid}-{count}.log", signal = "SIGUSR2" };
38 } 38 }
39 ``` 39 ```
40 40
41 The possible fields of the logging config entry are: 41 The possible fields of the logging config entry are:
42 42
43 `to` 43 `to`
44 : Set this to `"ringbuffer"`. 44 : Set this to `"ringbuffer"`.
45 45
46 `level` 46 `levels`
47 : The minimum log level to capture, e.g. `"debug"`. 47 : The log levels to capture, e.g. `{ min = "debug" }`. By default, all levels are captured.
48 48
49 `size` 49 `size`
50 : The size, in bytes, of the buffer. When the buffer fills, 50 : The size, in bytes, of the buffer. When the buffer fills,
51 old data will be overwritten by new data. 51 old data will be overwritten by new data.
52 52
107 -- other optional logging config here -- 107 -- other optional logging config here --
108 --- 108 ---
109 109
110 { 110 {
111 to = "ringbuffer"; 111 to = "ringbuffer";
112 level = "debug";
113 filename_template = "{paths.data}/traceback-{pid}-{count}.log"; 112 filename_template = "{paths.data}/traceback-{pid}-{count}.log";
114 event = "debug_traceback/triggered"; 113 event = "debug_traceback/triggered";
115 }; 114 };
116 } 115 }
117 ``` 116 ```