log only if logger