implement query logger (temp hack to fix service injection)