log self, autoimport rewrite