WeeChat DevCenter

Tag - logger

Entries feed

Monday, February 1 2010

Date in log filenames

It is now possible to use date formaters in log filenames (in mask options).

For example to have log by year and month in separate directories, you can do :

/set logger.file.mask "%Y/%m/$plugin.$name.weechatlog"

You'll have a tree like that:

~/.weechat/
    |- logs/
        |- 2009/
            |- 12/
                |  irc.server.freenode.weechatlog
                |  irc.freenode.#weechat.weechatlog
        |- 2010/
            |- 01/
                |  irc.server.freenode.weechatlog
                |  irc.freenode.#weechat.weechatlog

Friday, October 31 2008

New logger features

Logger plugin has been improved with many new features:

  • command /logger (to see log status for open buffers, and set/disable log level on a buffer)
  • custom level by buffer (or group of buffers)
  • custom log filename mask by buffer (or group of buffers).

Set one directory by IRC server and a file by channel inside:

Do that: /set logger.mask.irc irc/$server/$channel.weechatlog

You'll have a tree like that:

~/.weechat/
    |- logs/
        |- irc/
            |--- freenode/
            |       freenode.weechatlog
            |       #weechat.weechatlog
            |       #mychan.weechatlog
            |--- oftc/
            |       oftc.weechatlog
            |       #chan1.weechatlog
            |       #chan2.weechatlog

Log all messages on IRC buffers but not join/part/quit messages:

  • for all IRC buffers: /set logger.level.irc 3
  • for a server and its channels: /set logger.level.irc.freenode 3
  • for a specific channel: /set logger.level.irc.freenode.#weechat 3