change log output to logger instead of stdout