Hello @kartik,
You can try this as this works for me
use Symfony\Component\Console\Output\ConsoleOutput;
class MigrateData {
    public function up()
    {
        $output = new ConsoleOutput();
        for($i=0; $i<50000; $i++)
        {
             $output->writeln('Converting '.$i.' of 50000');
        }
     }
}
I have a migration which is converting a large table into a more efficient format and use this to get some progress while it works.
Hope this works fine!!
Thank You!!