Closed prologic closed 9 years ago
Hmm I'm not seeing an issue with the code here (het).
We already log several channels with dashses in them:
It's noteworthy to comment that my "output" file resides on nfs.
My command line: export USER=mybot irclogger -o /mypath/irc -c '#cat-v' irc.freenode.net
NFS eh? I can reproduce this at home then on my new shiny NAS :) I'll do some testing...
Thanks @jibanes -- Expect to see a duplicate logger join your chan :)
Could it be a bug in circuits? I'm using 3.1.0 and python 2.7.3
Oh sorry, I didn't know you wrote circuits too, nevermind that...
modified filename (strftime("%Y-%m-%d-%H-%M-%S", localtime())))
and setting this in "init" doesn't rotate it either:
#interval = datetime.fromordinal((
# date.today() + timedelta(1)
#).toordinal())
interval = 60
Timer(interval, rotate(), self.channel).register(self)
rotate does get called properly.
I confirm the issue has nothing to do with presence of '-' in channel name.
there's only one explanation, this is the issue: self.fire(open(path.join(dirname, logfile), "a"), self.channel)
dirname and logfile are properly set.
though this works: self.fire(close(), self.channel)
this doesn't look right: LOGFILE_REGEX = compileregex("^(.).(._).log$") note: apparently github doesn't display this right either
why do you have a dot between the captures? ok I see why: logger.#channel
is seems that generate_logfile returns something different from what parse_logfile provides.
I think I may have figured this out.
I've cleaned up some of the code in some places that were obviously just plain wrong and overly complex for what they were doing. Essentially removing parse_logfile()
which wasn't doing anything useful at all.
I'll test locally and hopefully commit and push a fix you can test with
I don't think NFS should have any bearing at all IHMO
thanks
On Sun, Apr 12, 2015 at 11:47 PM, James Mills notifications@github.com wrote:
I don't think NFS should have any bearing at all IHMO
— Reply to this email directly or view it on GitHub https://github.com/circuits/irclogger/issues/5#issuecomment-92232895.
Hmm it didn't rotate and stopped logging as you described :(
I won't know for sure whether this is fixed until Tuesday 14th 00:00 AEST tonight or unless I fake the time and do some unit testing, etc; but hopefully this does fix the issue. I think the filenames weren't generated properly. Please give this a try and let me know how it goes!
This still hasn't fixed it (yet) :/
Closed via abc04225d0f171dece3748d9a52b2a81213c8291
There seems to be an issue with log rotation with channels with dashes*.