Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / TAO / DevGuideExamples / SmartProxies / Logger_i.cpp
blobfc686f11a34a39f6b1793b4d9f6e0a76f0885016
1 #include "Logger_i.h"
2 #include "ace/OS_NS_time.h"
3 #include <iostream>
5 Logger_i::Logger_i ()
7 log_file.open("Logger.txt");
10 Logger_i::~Logger_i ()
12 log_file.close();
15 CORBA::Boolean Logger_i::log_message (const char * message)
17 ACE_OS::time(&log_time);
18 log_time_string = ACE_OS::ctime(&log_time);
19 // Replace carriage return with string delimiter.
20 log_time_string[24] = '\0';
21 log_file << ACE_TEXT_ALWAYS_CHAR(log_time_string.c_str()) << " "
22 << message << std::endl;
23 return true;