Date in log filenames
By Sébastien Helleu on Monday, February 1 2010, 20:00 - plugins - Permalink
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
Comments
I thought I would add this comment since it confused me a little at first and I was one of the requesters of this feature.
Because I don't like filenames like the static $plugin.$name. FlashCode was good enough to add logger.mask.$plugin configuration option that allows each plugin to override the default options.
So I have logger.mask.irc = "$server/$channel/%Y.%m.log" << Woohoo how cool is it that you can use irc properties in the logger.mask.irc config option!
set logger '$server/$channel/%Y-%m.log'
is creating a file named '%y-%m.log' ie. date format strings dont seem to be parsing correctly using the ubuntu deb downloads.
This feature is available only in version 0.3.2-dev (future 0.3.2), and not in 0.3.1 or older versions.