Diff

mod_log_rate/README.md @ 6211:750d64c47ec6 draft default tip

Merge
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Tue, 18 Mar 2025 00:31:36 +0700
parent 6003:fe081789f7b5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_log_rate/README.md	Tue Mar 18 00:31:36 2025 +0700
@@ -0,0 +1,33 @@
+---
+summary: Collect statistics on rate of log messages
+...
+
+Introduction
+============
+
+If you ever wanted to collect statistics on the number of log messages,
+this is the module for you!
+
+Setup
+=====
+
+After [installing the module](https://prosody.im/doc/installing_modules)
+and adding it to modules\_enabled as most other modules, you also need
+to add it to your logging config:
+
+``` {.lua}
+log = {
+  -- your other log sinks
+  info = "/var/log/prosody/prosody.log"
+  -- add this:
+  { to = "measure" };
+}
+```
+
+Then log messages will be counted by
+[statsmanager](https://prosody.im/doc/developers/core/statsmanager).
+
+Compatibility
+=============
+
+Reqires Prosody 0.10 or above.