Replace prints with log statements.