Back to index

moin  1.9.0~rc2
putClientInfo.py
Go to the documentation of this file.
00001 """
00002     This is a wiki xmlrpc plugin doing some usage logging.
00003     It enables server admins to see how many clients use xmlrpc how often.
00004     It also helps MoinMoin development team  to improve xmlrpc stuff and get
00005     some statistics about MoinMoin usage.
00006 
00007     @copyright: 2004 MoinMoin:ThomasWaldmann
00008     @license: GNU GPL, see COPYING for details.
00009 """
00010 
00011 import os, time
00012 
00013 def execute(xmlrpcobj, action, site):
00014     t = time.time()
00015     logentry = '%d %s %s\n' % (t, action, site)
00016     log = open(os.path.join(xmlrpcobj.request.cfg.data_dir, 'xmlrpc-log'), 'a')
00017     log.write(logentry)
00018     log.close()
00019     return 0
00020