implement logging roughly.