Opened 2 years ago

Last modified 2 years ago

#5641 enhancement new

Add date logging to ircLogBot.py

Reported by: singingwolfboy Owned by: singingwolfboy
Priority: normal Milestone:
Component: words Keywords:
Cc: ralphm Branch:
Author: Launchpad Bug:

Description

I downloaded ircLogBot.py from the twisted documentation, and it works great! The one problem is that it doesn't indicate what day a message was sent on. With the help of the friendly people in the #twisted IRC channel, I put together a patch to write the current date into the log file once a day at one second past midnight. I figured it would be worth contributing this patch back to the community -- please take a look at it, and if it looks good, add it to the project!

Attachments (2)

ircLogBot.patch (1.8 KB) - added by singingwolfboy 2 years ago.
ircLogBot.2.patch (1.8 KB) - added by singingwolfboy 2 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 2 years ago by DefaultCC Plugin

  • Cc ralphm added

Changed 2 years ago by singingwolfboy

Changed 2 years ago by singingwolfboy

comment:2 Changed 2 years ago by singingwolfboy

I discovered there was a bug in my code, and I've updated the patch.

comment:3 Changed 2 years ago by thijs

  • Keywords review added

Thanks for your patch singingwolfboy! Putting it up for review as described on ReviewProcess#Authors:Howtogetyourchangereviewed.

comment:4 Changed 2 years ago by exarkun

  • Keywords review removed
  • Owner set to singingwolfboy

Thanks for the contribution, singingwolfboy.

I think this change overly complicates the example, the primary purpose of which is to demonstrate IRC functionality. Using callLater and LoopingCall adds more concepts to stumble over.

I'm not against including the date in the log file somehow, but I think it needs to be done more simply than this, so as not to confuse people who are trying to learn about Twisted's IRC support.

Note: See TracTickets for help on using tickets.