summaryrefslogtreecommitdiff
path: root/stdafx.cpp
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-02-04 13:28:41 -0500
committerDwight <dmerriman@gmail.com>2009-02-04 13:28:41 -0500
commitd6cfa79e01a49f8c0ada8fa8f11ec640374ee2ee (patch)
tree6d7c1d873d0b9ea54ce239559b60065b8d8634c3 /stdafx.cpp
parent5dd84d06387a16a0ec0bcb66478b3eeea6e03dd9 (diff)
parent0b3d1f1a152e09465e69f57fc959d9fa13fe779e (diff)
downloadmongo-d6cfa79e01a49f8c0ada8fa8f11ec640374ee2ee.tar.gz
Merge branch 'master' of git.10gen.com:/data/gitroot/p
Conflicts: stdafx.h
Diffstat (limited to 'stdafx.cpp')
-rw-r--r--stdafx.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdafx.cpp b/stdafx.cpp
index ade2d6281ef..88156f17473 100644
--- a/stdafx.cpp
+++ b/stdafx.cpp
@@ -106,5 +106,20 @@ namespace mongo {
dbexit( status );
}
+ void rawOut( const string &s ) {
+ if( s.empty() ) return;
+ char now[64];
+ time_t_to_String(time(0), now);
+ now[20] = 0;
+#if defined(_WIN32)
+ (std::cout << now << " " << s).flush();
+#else
+ write( STDOUT_FILENO, now, 20 );
+ write( STDOUT_FILENO, " ", 1 );
+ write( STDOUT_FILENO, s.c_str(), s.length() );
+ fsync( STDOUT_FILENO );
+#endif
+ }
+
} // namespace mongo