Added ifndef's around logging surrogates