Mercurial > prosody-modules
comparison mod_log_rate/README.md @ 5975:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
| author | Menel <menel@snikket.de> |
|---|---|
| date | Tue, 22 Oct 2024 10:26:01 +0200 |
| parents | mod_log_rate/README.markdown@8de50be756e5 |
| children |
comparison
equal
deleted
inserted
replaced
| 5974:5a65a632d5b9 | 5975:fe081789f7b5 |
|---|---|
| 1 --- | |
| 2 summary: Collect statistics on rate of log messages | |
| 3 ... | |
| 4 | |
| 5 Introduction | |
| 6 ============ | |
| 7 | |
| 8 If you ever wanted to collect statistics on the number of log messages, | |
| 9 this is the module for you! | |
| 10 | |
| 11 Setup | |
| 12 ===== | |
| 13 | |
| 14 After [installing the module](https://prosody.im/doc/installing_modules) | |
| 15 and adding it to modules\_enabled as most other modules, you also need | |
| 16 to add it to your logging config: | |
| 17 | |
| 18 ``` {.lua} | |
| 19 log = { | |
| 20 -- your other log sinks | |
| 21 info = "/var/log/prosody/prosody.log" | |
| 22 -- add this: | |
| 23 { to = "measure" }; | |
| 24 } | |
| 25 ``` | |
| 26 | |
| 27 Then log messages will be counted by | |
| 28 [statsmanager](https://prosody.im/doc/developers/core/statsmanager). | |
| 29 | |
| 30 Compatibility | |
| 31 ============= | |
| 32 | |
| 33 Reqires Prosody 0.10 or above. |
