write output to logger