view MoinMoin/xmlrpc/putClientInfo.py @ 6106:b59ee217581c

remove MoinMoin.support.HeaderFixed assuming it is fixed in 2.7. no idea what the problem was, comments unhelpful.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 06 Sep 2016 01:52:01 +0200
parents 01f05e74aa9c
children
line wrap: on
line source
"""
    This is a wiki xmlrpc plugin doing some usage logging.
    It enables server admins to see how many clients use xmlrpc how often.
    It also helps MoinMoin development team  to improve xmlrpc stuff and get
    some statistics about MoinMoin usage.

    @copyright: 2004 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.
"""

import os, time

def execute(xmlrpcobj, action, site):
    t = time.time()
    logentry = '%d %s %s\n' % (t, action, site)
    log = open(os.path.join(xmlrpcobj.request.cfg.data_dir, 'xmlrpc-log'), 'a')
    log.write(logentry)
    log.close()
    return 0