comparison plugins/logger/logger.md @ 0:1158cffe5a5e

Initial import
author David Demelier <markand@malikania.fr>
date Mon, 08 Feb 2016 16:43:14 +0100
parents
children 64f05a1feade
comparison
equal deleted inserted replaced
-1:000000000000 0:1158cffe5a5e
1 ---
2 title: "Logger plugin"
3 header: "Logger plugin"
4 ---
5
6 The plugin **logger** may be used to log everything you want. It supports the following events:
7
8 - Channel mode,
9 - Channel notice,
10 - Join,
11 - Kick,
12 - Me,
13 - Message,
14 - Mode,
15 - Notice,
16 - Part,
17 - Query,
18 - Topic.
19
20 ## Installation
21
22 The plugin **logger** is distributed with irccd. To enable it add the following to your `plugins` section:
23
24 ````ini
25 [plugins]
26 logger = ""
27 ````
28
29 ## Usage
30
31 There is nothing to do, except configuring it.
32
33 ## Configuration
34
35 The plugin **logger** can be configured to format logs and to use different log path.
36
37 The following options are available under the `[plugin.logger]` section:
38
39 - **path**: (string) the path to the file where to store logs,
40 - **cmode**: (string) format for channel mode change,
41 - **cnotice**: (string) format for channel notices,
42 - **join**: (string) format when someone joins a channel,
43 - **kick**: (string) format when someone has been kicked,
44 - **me**: (string) format for emote actions,
45 - **message**: (string) format for channel messages,
46 - **mode**: (string) format for user mode change,
47 - **notice**: (string) format on private notices,
48 - **part**: (string) format when someone leaves a channel,
49 - **query**: (string) format on private messages,
50 - **topic**: (string) format when a topic is changed.
51
52 ### Keywords supported
53
54 The following keywords are supported:
55
56 | Format | Keywords | Notes |
57 |-------------------------|-----------------------------------|---------------------------------|
58 | (any) | server, nickname, origin, source | source is the channel or nick |
59 | **format-cmode** | arg, channel, mode, | the mode and its arguments |
60 | **format-cnotice** | channel, message | the message notice |
61 | **format-join** | channel | |
62 | **format-kick** | channel, reason, target | |
63 | **format-me** | channel, message | message is the emote action |
64 | **format-message** | channel, message | |
65 | **format-mode** | mode, arg | the mode and its arguments |
66 | **format-notice** | message | the notice message |
67 | **format-part** | channel, reason | |
68 | **format-query** | message | |
69 | **format-topic** | channel, topic | |
70
71 The **source** keyword is specially designed to use a generic path for the path parameter.
72
73 Example:
74
75 ````ini
76 [plugin.logger]
77 path = "/var/logs/irccd/#{server}/%y/%m/%d/#{source}.txt
78 format-join = "user #{nickname} joined #{channel}"
79 ````