Update agent.py

updates record_log_activity(). it now updates the database table with the log acitivities