[android] Add more logging to downloader.

This commit is contained in:
vng 2012-09-26 13:01:10 +03:00 committed by Alex Zolotarev
parent cbb9bd04ce
commit d0290d3a73
2 changed files with 5 additions and 2 deletions

View file

@ -147,7 +147,7 @@ class DownloadChunkTask extends AsyncTask<Void, byte[], Boolean>
}
catch (IOException ex)
{
Log.d(TAG, "IOException in doInBackground: ", ex);
Log.d(TAG, "IOException in doInBackground for URL: " + m_url, ex);
// Notify the client about error
m_httpErrorCode = IO_ERROR;
@ -182,7 +182,7 @@ class DownloadChunkTask extends AsyncTask<Void, byte[], Boolean>
}
catch (IOException ex)
{
Log.d(TAG, "IOException in downloadFromStream: ", ex);
Log.d(TAG, "IOException in downloadFromStream for chunk size: " + arrSize[i], ex);
}
}

View file

@ -148,6 +148,9 @@ void ChunksDownloadStrategy::ChunkFinished(bool success, RangeT const & range)
}
else
{
LOG(LINFO, ("Thread for url", m_servers[s].m_url,
"failed to download chunk number", m_servers[s].m_chunkIndex));
// remove failed server and mark chunk as free
m_servers.erase(m_servers.begin() + s);
res.first->m_status = CHUNK_FREE;