hook in logger at the beginning