From f4479e0adab9dc344206017b542ec8628e9996da Mon Sep 17 00:00:00 2001 From: Kevin Alberts Date: Tue, 15 Jul 2025 14:14:54 +0200 Subject: [PATCH] Add logging --- multiplexer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/multiplexer.py b/multiplexer.py index 4611080..adf5e90 100644 --- a/multiplexer.py +++ b/multiplexer.py @@ -34,6 +34,7 @@ def ingest_request(): headers=request.headers, params={'token': REITTI_API_KEY} ) + app.logger.info(f'Forwarded point to Reitti: {response1.status_code}') except Exception as e: app.logger.error(f'Error forwarding request to Reitti: {str(e)}') @@ -49,14 +50,15 @@ def ingest_request(): headers=request.headers, params={'api_key': DAWARICH_API_KEY} ) - - return jsonify({'status': 'success'}), 200 + app.logger.info(f'Forwarded point to Dawarich: {response2.status_code}') except Exception as e: app.logger.error(f'Error forwarding request to Dawarich: {str(e)}') errors.append({'service': 'dawarich', 'status': 'error', 'message': str(e)}) - return jsonify(errors), 500 + return jsonify(errors), 500 + + return jsonify({'status': 'success'}), 200 if __name__ == '__main__': app.run(host="0.0.0.0", port=8000)