Work around the dialyzer warning for the LOG_PROTOCOL macro.

Dialyzer warns us that the LOG_PROTOCOL is always false and cannot
match the value of true.  In order to override such a warning, we
use ifdef macro.