add log_id method

add log_id method
change private method to protected
This function should be named `get_log` so that it aligns with the naming scheme `get_*` that is used by `get_template`.