Logger plugin The Logger plugin lets you save content of buffers to files, with options about what and how it is saved.
Options (file logger.conf) &logger_options.xml;
Commands &logger_commands.xml;
Infos and infolists Type Name Description &logger_infos.xml;
Levels Logging is made with a level for each buffer. Default level is 9 (log all messages displayed on buffer). You can change level for one buffer, or a group of buffers. Possible levels are 0 to 9. Zero means "do not log anything" and 9 means "log all messages". Plugins are using different levels for messages displayed. IRC plugin uses following levels: Level 1: message from user (on channel or private) Level 2: nick change (you or someone else) Level 3: any server message (except join/part/quit) Level 4: server message join/part/quit So if you set level 3 for an IRC channel, WeeChat will log all messages, but not join/part/quit. Some examples: set level 3 for IRC channel #weechat: /set logger.level.irc.freenode.#weechat 3 set level 3 for freenode server buffer: /set logger.level.irc.server.freenode 3 set level 3 for all channels on server freenode: /set logger.level.irc.freenode 3 set level 2 for all IRC buffers: /set logger.level.irc 2
Filename masks It is possible to define a filename mask for each buffer, and use local buffer variables to build filename (to see local variables for current buffer: /buffer localvar). For example if you want one directory by IRC server and one file by channel inside: /set logger.mask.irc "irc/$server/$channel.weechatlog" You'll have following files: ~/.weechat/ |--- logs/ |--- irc/ |--- freenode/ | freenode.weechatlog | #weechat.weechatlog | #mychan.weechatlog |--- oftc/ | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog