Customized version of logmagic.