improve lock logging

also improve macro variable names