injecting logger on-demand