Replaces System.out.println with logs.