annotate mod_log_messages_sql/README.markdown @ 4579:b305814bd930

mod_muc_dicebot: A thing to roll dice Do you see what happens, Jitsi? Do you see what happens when you make it hard for me to use a proper bot? This is what happens, Jitsi. This is what happens when you meet a stranger in the alps! Ahem. In all seriousness, this is more of a quick hack than anything else. It will look for `.r` in MUC messages and if it finds it, it'll interpret it as an instruction to roll a few dice. Injects the results in the body of the message. Eats the message alive if it is malformed.
author Jonas Schäfer <jonas@wielicki.name>
date Sat, 29 May 2021 15:17:05 +0200
parents b74c86d137c9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2406
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
1 # Introduction
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
2
3438
b74c86d137c9 mod_log_messages_sql/README: Add pointer towards mod_mam + mod_readonly
Kim Alvefur <zash@zash.se>
parents: 2406
diff changeset
3 ::: {.alert .alert-danger}
b74c86d137c9 mod_log_messages_sql/README: Add pointer towards mod_mam + mod_readonly
Kim Alvefur <zash@zash.se>
parents: 2406
diff changeset
4 Consider using [mod_mam][doc:modules:mod_mam] together with
b74c86d137c9 mod_log_messages_sql/README: Add pointer towards mod_mam + mod_readonly
Kim Alvefur <zash@zash.se>
parents: 2406
diff changeset
5 [mod_readonly] instead.
b74c86d137c9 mod_log_messages_sql/README: Add pointer towards mod_mam + mod_readonly
Kim Alvefur <zash@zash.se>
parents: 2406
diff changeset
6 :::
b74c86d137c9 mod_log_messages_sql/README: Add pointer towards mod_mam + mod_readonly
Kim Alvefur <zash@zash.se>
parents: 2406
diff changeset
7
2323
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 This module logs messages to a SQL database.
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 SQL connection options are configured in a `message_log_sql` option,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 which has the same syntax as the `sql` option for
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 [mod_storage_sql][doc:modules:mod_storage_sql].
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13
2406
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
14 # Usage
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
15
2323
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 You will need to create the following table in the configured database:
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 ``` sql
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19 CREATE TABLE `prosodyarchive` (
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 `host` TEXT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 `user` TEXT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 `store` TEXT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 `id` INTEGER PRIMARY KEY AUTOINCREMENT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 `when` INTEGER,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 `with` TEXT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 `resource` TEXT,
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 `stanza` TEXT);
35ae59a8196d Add some documentation stubs
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28 ```
2406
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
29
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
30 # Compatibility
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
31
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
32 Does *NOT* work with 0.10 due to a conflict with the new archiving
a216be9b1d6e mod_log_messages_sql/README: Point out incompatibility with 0.10
Kim Alvefur <zash@zash.se>
parents: 2323
diff changeset
33 support in `mod_storage_sql`ยท