magic logging