added logging support and basic logging