Mercurial > prosody-modules
comparison mod_log_ringbuffer/README.markdown @ 5650:0eb2d5ea2428
merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Sat, 06 May 2023 19:40:23 -0500 |
parents | 893b9c3c0d20 |
children | 133b23758cf6 |
comparison
equal
deleted
inserted
replaced
5649:2c69577b28c2 | 5650:0eb2d5ea2428 |
---|---|
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 = "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 ``` |