In the log I see things like:

    2017-09-13 03:54:33 init message: Rescanning...
    2017-09-13 03:54:33 Rescanning last 68616 blocks (from block 416339)...
    2017-09-13 03:54:40 AddToWallet xxxxx  update
    2017-09-13 03:55:33 Still rescanning. At block 418849. Progress=0.549138

I would be interested to see the wallet file name on each of these log lines.

Would there be any interest in merging such a PR?
return nullptr;
        }
    }
    walletInstance->m_confirm_target = gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
    walletInstance->m_spend_zero_conf_change = gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE);
    walletInstance->m_signal_rbf = gArgs.GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
    LogPrintf(" wallet      %15dms\n", GetTimeMillis() - nStart);
    
    walletInstance->TopUpKeyPool();
    LOCK(cs_main);
    CBlockIndex *pindexRescan = chainActive.Genesis();
    if (!gArgs.GetBoolArg("-rescan", false))
    {
        WalletBatch batch(*walletInstance->database);
        CBlockLocator locator;
        if (batch.ReadBestBlock(locator))
            pindexRescan = FindForkInGlobalIndex(chainActive, locator);
    }
    walletInstance->m_last_block_processed = chainActive.Tip();
    if (chainActive.Tip() && chainActive.Tip() != pindexRescan)
    {
        
        
        
        if (fPruneMode)
        {
            CBlockIndex *block = chainActive.Tip();
            while (block && block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA) && block->pprev->nTx > 0 && pindexRescan != block)
                block = block->pprev;
            if (pindexRescan != block) {