Which version of Moodle are you using? After Moodle 2.7, the log method was changed, and newer systems are likely using the table prefix_logstore_standard_log instead. For examples of the changes needed to use the new log table, see
https://docs.moodle.org/33/en/ad-hoc_contributed_reports#Weekly_Instructor_Online_Participation
Best regards,
Elizabeth Dalton