How to get last insert ID of drupal_write_record
Assuming your {user_log} table has a PRIMARY KEY with it, or something else serial, then it should be set in in the array you passed to it.  In your case, it would be something like

$last_log_id = $log['log_id'];