Add logging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kevin Alberts 2025-07-15 14:14:54 +02:00
parent ebdafbb5fe
commit f4479e0ada

View file

@ -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)