diff --git a/misp_api.py b/misp_api.py index 79b8e5f..2b5036b 100644 --- a/misp_api.py +++ b/misp_api.py @@ -29,7 +29,7 @@ def get(url, data={}, api_key=misp_apikey): try: response = requestSession.get(full_url, data=data, headers=headers, verify=not misp_skipssl) except requests.exceptions.ConnectionError as e: - logger.info('Could not perform request on MISP.', e) + logger.info('Could not perform request on MISP. %s', e) return None return response.json() if response.headers['content-type'].startswith('application/json') else response.text @@ -45,7 +45,7 @@ def post(url, data={}, api_key=misp_apikey): try: response = requestSession.post(full_url, data=json.dumps(data), headers=headers, verify=not misp_skipssl) except requests.exceptions.ConnectionError as e: - logger.info('Could not perform request on MISP.', e) + logger.info('Could not perform request on MISP. %s', e) return None return response.json() if response.headers['content-type'].startswith('application/json') else response.text diff --git a/server.py b/server.py index 0b1c942..0ed568e 100755 --- a/server.py +++ b/server.py @@ -58,11 +58,11 @@ app = socketio.WSGIApp(sio, static_files={ @sio.event def connect(sid, environ): - logger.debug("Client connected: " + sid) + logger.debug("Client connected: %s", sid) @sio.event def disconnect(sid): - logger.debug("Client disconnected: " + sid) + logger.debug("Client disconnected: %s", sid) @sio.event def get_exercises(sid): @@ -110,7 +110,7 @@ def toggle_verbose_mode(sid, payload): @sio.on('*') def any_event(event, sid, data={}): - logger.info('>> Unhandled event', event) + logger.info('>> Unhandled event %s', event) def handleMessage(topic, s, message): data = json.loads(message) @@ -185,7 +185,7 @@ def forward_zmq_to_socketio(): ZMQ_MESSAGE_COUNT += 1 handleMessage(topic, s, m) except Exception as e: - logger.error('Error handling message', e) + logger.error('Error handling message %s', e) if __name__ == "__main__":