diff --git a/rhodecode/lib/channelstream.py b/rhodecode/lib/channelstream.py --- a/rhodecode/lib/channelstream.py +++ b/rhodecode/lib/channelstream.py @@ -209,15 +209,16 @@ def update_history_from_logs(config, cha def write_history(config, message): - """ writes a messge to a base64encoded filename """ + """ writes a message to a base64encoded filename """ history_location = config.get('history.location') if not os.path.exists(history_location): return try: LOCK.acquire_write_lock() filepath = log_filepath(history_location, message['channel']) + json_message = json.dumps(message) with open(filepath, 'ab') as f: - json.dump(message, f) + f.write(json_message) f.write('\n') finally: LOCK.release_write_lock()