diff options
Diffstat (limited to 'stdafx.cpp')
-rw-r--r-- | stdafx.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/stdafx.cpp b/stdafx.cpp index ade2d6281ef..b4f90f7162a 100644 --- a/stdafx.cpp +++ b/stdafx.cpp @@ -106,5 +106,19 @@ namespace mongo { dbexit( status ); } + void rawOut( const string &s ) { + 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 |