From 51419ad9e0500fbece74816b4003a333395cd1f1 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 9 Oct 2019 21:39:12 +0100 Subject: [PATCH] Added debug error logging --- application/controllers/Clublog.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index 0b0117bb..02bf8425 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -103,16 +103,22 @@ class Clublog extends CI_Controller { $this->load->model('clublog_model'); $this->clublog_model->mark_qsos_sent($station_row->station_id); + echo "Clublog upload for ".$station_row->station_callsign; + log_message('info', 'Clublog upload for '.$station_row->station_callsign.' successfully sent.'); } else { echo "Error ".$response; + log_message('error', 'Clublog upload for '.$station_row->station_callsign.' failed reason '.$response); } // Delete the ADIF file used for clublog unlink('uploads/clublog'.$ranid.$station_row->station_id.'.adi'); + } } else { - echo "Nothing awaiting upload to clublog for ".$station_row->station_callsign; + echo "Nothing awaiting upload to clublog for ".$station_row->station_callsign; + + log_message('info', 'Nothing awaiting upload to clublog for '.$station_row->station_callsign); } } }