atscppapi: Locking fix in xform and utility macro for logging