0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

debugging for import

This commit is contained in:
Eliot Horowitz 2009-10-11 20:24:12 -04:00
parent 324438fbae
commit 65fb01f015

View File

@ -155,6 +155,8 @@ public:
return -1;
}
log(1) << "ns: " << ns << endl;
auth();
if ( hasParam( "drop" ) ){
@ -194,15 +196,17 @@ public:
time_t start = time(0);
log(1) << "filesize: " << fileSize << endl;
ProgressMeter pm( fileSize );
const int BUF_SIZE = 1024 * 1024 * 4;
char line[ (1024 * 1024 * 4) + 128];
while ( *in ){
in->getline( line , BUF_SIZE );
log(1) << "got line:" << line << endl;
char * buf = line;
while( isspace( buf[0] ) ) buf++;
int len = strlen( buf );
if ( ! len )
continue;