avoid unset variable errors in log api functions