

def log(self, output, event):
    if (('_event' in event) and ('_bits' in event)):
        stat = self._event_stats.get(event['_event'], [0, 0])
        stat[0] += 1
        stat[1] += event['_bits']
        self._event_stats[event['_event']] = stat
    if args.json:
        s = json.dumps(event, encoding='ISO-8859-1')
        print(s)
    else:
        pprint.pprint(event, stream=output)

dataset/ETHPy150Open Blizzard/heroprotocol/heroprotocol.py EventLogger.log/original