Mercurial > irccd
diff plugins/logger/logger.md @ 413:9bc2da03dbe1 stable-2
Merge from default
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 01 Feb 2017 11:41:18 +0100 |
parents | 50dcadcf5070 c143682678b9 |
children | 3d0dbc0bee7d |
line wrap: on
line diff
--- a/plugins/logger/logger.md Tue Nov 01 13:44:12 2016 +0100 +++ b/plugins/logger/logger.md Wed Feb 01 11:41:18 2017 +0100 @@ -1,6 +1,7 @@ --- title: "Logger plugin" header: "Logger plugin" +guide: yes --- The plugin **logger** may be used to log everything you want. It supports the following events: @@ -32,41 +33,58 @@ ## Configuration -The plugin **logger** can be configured to format logs and to use different log path. - The following options are available under the `[plugin.logger]` section: - - **file**: (string) the path to the file where to store logs, - - **format-cmode**: (string) format for channel mode change, - - **format-cnotice**: (string) format for channel notices, - - **format-join**: (string) format when someone joins a channel, - - **format-kick**: (string) format when someone has been kicked, - - **format-me**: (string) format for emote actions, - - **format-message**: (string) format for channel messages, - - **format-mode**: (string) format for user mode change, - - **format-notice**: (string) format on private notices, - - **format-part**: (string) format when someone leaves a channel, - - **format-query**: (string) format on private messages, - - **format-topic**: (string) format when a topic is changed. + - **path**: (string) the path to the file where to store logs, + +**Deprecated in irccd 2.1.0:** + + - **format-cmode**: Use `[format.logger] cmode` instead, + - **format-cnotice**: Use `[format.logger] cnotice` instead, + - **format-join**: Use `[format.logger] join` instead, + - **format-kick**: Use `[format.logger] kick` instead, + - **format-me**: Use `[format.logger] me` instead, + - **format-message**: Use `[format.logger] message` instead, + - **format-mode**: Use `[format.logger] mode` instead, + - **format-notice**: Use `[format.logger] notice` instead, + - **format-part**: Use `[format.logger] part` instead, + - **format-query**: Use `[format.logger] query` instead, + - **format-topic**: Use `[format.logger] topic` instead, + +## Formats + +The **logger** plugin supports the following formats in `[format.logger]` section: + + - **cmode**: (string) format for channel mode change, + - **cnotice**: (string) format for channel notices, + - **join**: (string) format when someone joins a channel, + - **kick**: (string) format when someone has been kicked, + - **me**: (string) format for emote actions, + - **message**: (string) format for channel messages, + - **mode**: (string) format for user mode change, + - **notice**: (string) format on private notices, + - **part**: (string) format when someone leaves a channel, + - **query**: (string) format on private messages, + - **topic**: (string) format when a topic is changed. ### Keywords supported The following keywords are supported: -| Format | Keywords | Notes | -|-------------------------|-----------------------------------|---------------------------------| -| (any) | nickname, origin, server, source | source is the channel or nick | -| **format-cmode** | arg, channel, mode, | the mode and its arguments | -| **format-cnotice** | channel, message | the message notice | -| **format-join** | channel | | -| **format-kick** | channel, reason, target | | -| **format-me** | channel, message | message is the emote action | -| **format-message** | channel, message | | -| **format-mode** | arg, mode | the mode and its arguments | -| **format-notice** | message | the notice message | -| **format-part** | channel, reason | | -| **format-query** | message | | -| **format-topic** | channel, topic | | +| Format | Keywords | Notes | +|-------------|-----------------------------------|---------------------------------| +| (any) | nickname, origin, server, source | source is the channel or nick | +| **cmode** | arg, channel, mode, | the mode and its arguments | +| **cnotice** | channel, message | the message notice | +| **join** | channel | | +| **kick** | channel, reason, target | | +| **me** | channel, message | message is the emote action | +| **message** | channel, message | | +| **mode** | arg, mode | the mode and its arguments | +| **notice** | message | the notice message | +| **part** | channel, reason | | +| **query** | message | | +| **topic** | channel, topic | | The **source** keyword is specially designed to use a generic path for the path parameter. @@ -77,8 +95,10 @@ <div class="panel-body"> ````ini [plugin.logger] -file = "/var/log/irccd/#{server}/%y/%m/%d/#{source}.txt" -format-join = "user #{nickname} joined #{channel}" +path = "/var/log/irccd/#{server}/%y/%m/%d/#{source}.txt" + +[format.logger] +join = "user #{nickname} joined #{channel}" ```` </div> </div>