|
From: <gb...@us...> - 2008-06-24 14:05:51
|
Revision: 209
http://gearbox.svn.sourceforge.net/gearbox/?rev=209&view=rev
Author: gbiggs
Date: 2008-06-24 07:03:59 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
Added some extra verbosity to logging of chunk reading
Modified Paths:
--------------
gearbox/trunk/submitted/flexiport/logfile.cpp
Modified: gearbox/trunk/submitted/flexiport/logfile.cpp
===================================================================
--- gearbox/trunk/submitted/flexiport/logfile.cpp 2008-06-24 12:25:19 UTC (rev 208)
+++ gearbox/trunk/submitted/flexiport/logfile.cpp 2008-06-24 14:03:59 UTC (rev 209)
@@ -1099,8 +1099,16 @@
{
if (_debug >= 3)
{
+ long pos;
+ if ((pos = ftell (file)) < 0)
+ {
+ stringstream ss;
+ ss << "LogFile::" << __func__ << "() ftell() error: (" << ErrNo () << ") " <<
+ StrError (ErrNo ());
+ throw PortException (ss.str ());
+ }
cerr << "LogFile::" << __func__ << "() Reading a single chunk from " <<
- ((file == _readFile) ? "read file." : "write file.") << endl;
+ ((file == _readFile) ? "read file" : "write file") << " at position " << pos << endl;
}
// Read the chunk info
@@ -1112,7 +1120,10 @@
ReadFromFile (file, &tempSize, sizeof (tempSize));
size = ntohl (tempSize);
if (_debug >= 3)
- cerr << "LogFile::" << __func__ << "() Chunk is " << size << " bytes." << endl;
+ {
+ cerr << "LogFile::" << __func__ << "() Chunk has time " << timeStamp.tv_sec << "s " <<
+ timeStamp.tv_usec << "us and is " << size << " bytes." << endl;
+ }
// Check if this chunk will fit in data
if (size > count)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|