Add log functions.