add endpoint, add protocol logging

Why underscore here? style or some correctness reason?