[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Logging with subdirectories (patch)
On Wed, 20 Jun 2001 18:36:57 +0200
Tobias von Koch <tvk@weltcharts.de> wrote:
> Hi,
>
> xchat already supports customizing of the names of the logfiles it
> generates.
>
> But when I wanted to set this logmask to something like "%c/%y.log"
(which
> should create logfiles in the style "#channelname/20010620.log"), I had
to
> find out xchat won't create the subdirectories for me.
>
> With the attached patch, xchat will now check if all the directories in
> the logmask exist, and will create the missing ones.
>
> I think "%c/%y" is better than the default "%s,%c.xchatlog", maybe this
> should be made the default.
>
> Additionally this patch adds support for \ in logfile pathnames (WIN32).
>
> mfg
> tobias
A bit of a late reply, but better late then never.
There's a couple problems with the patch, the first one, I think it leaks
the "sep". It gets set to NULL, so effectively it will be doing free(0).
Free(0) crashes on some unix's, but is ignored on linux.
The second thing, you don't need to use "\" for win32, access/open etc
handle forward slashes just fine, I think it's better if this was removed
so it doesn't create a path with some "\" and some "/".
Besides that, I don't have a problem with putting this in. How confident
are you that the code is safe and can be put in "stable" 1.8.1?
Also, please use diff -u in future, so the patches are readable :)
--
Peter Zelezny. <zed@linux.com>
-
XChat-discuss: mailing list for XChat users
Archive: http://mail.nl.linux.org/xchat-discuss/
Posted By: Peter Zelezny <zed@linux.com>