http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10637
Revision: 10637 Author: xqt Date: 2012-11-01 12:10:58 +0000 (Thu, 01 Nov 2012) Log Message: ----------- put logs into the logs sub-folder
Modified Paths: -------------- branches/rewrite/pywikibot/bot.py
Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2012-11-01 05:10:12 UTC (rev 10636) +++ branches/rewrite/pywikibot/bot.py 2012-11-01 12:10:58 UTC (rev 10637) @@ -149,9 +149,9 @@ # if user has enabled file logging, configure file handler if moduleName in config.log or '*' in config.log: if config.logfilename: - logfile = config.datafilepath(config.logfilename) + logfile = config.datafilepath("logs", config.logfilename) else: - logfile = config.datafilepath("%s-bot.log" % moduleName) + logfile = config.datafilepath("logs", "%s-bot.log" % moduleName) file_handler = RotatingFileHandler( filename=logfile, maxBytes=2 << 20, backupCount=5)
pywikipedia-svn@lists.wikimedia.org