def __call__(self, f):
        def func(environ, start_response):
            res = f(environ, start_response)
            tts = time.strftime("%d/%b/%Y:%H:%M:%S", time.gmtime())
            if type(res) is list:
                content = "".join(res)
                size = len(content)
            elif hasattr(res, "name"):
                #this is a filetype object
                size = os.path.getsize(res.name)
            else:
                size = "-"
            #this is provided by a proxy or direct
            remote_host = environ.get('HTTP_X_FORWARDED_FOR', environ['fapws.remote_addr'])
            self.output.write((remote_host, environ['HTTP_HOST'], tts, environ['REQUEST_METHOD'], environ['fapws.uri'], environ['wsgi.url_scheme'],  start_response.status_code, size, environ.get("HTTP_REFERER", "-"), environ.get('HTTP_USER_AGENT', "-")) % "%s %s - [%s GMT] \"%s %s %s\" %s %s \"%s\" \"%s\"\n")
            self.output.flush()
            return res
        return func
dataset/ETHPy150Open baseblack/ReproWeb/3rdParty/python/fapws/contrib/log.py/Log.__call__/swapped operands of `%`