You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
629 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "objectConsoleLoggingService.h"
  2. objectConsoleLoggingService::objectConsoleLoggingService(): basicLoggingService(){
  3. m_bLogging = true;
  4. };
  5. void objectConsoleLoggingService::logMessage( CSTR Msg ){
  6. logMessage( (const char *)Msg );
  7. };
  8. void objectConsoleLoggingService::logMessage( const char *Msg ){
  9. if ( m_bLogging ){
  10. time_t LocalTime;
  11. tm *gmt_time;
  12. time( &LocalTime );
  13. gmt_time = gmtime( &LocalTime );
  14. printf( "%04d-%02d-%02d %02d:%02d:%02d %s\n", 1900+gmt_time->tm_year, 1+gmt_time->tm_mon, gmt_time->tm_mday, gmt_time->tm_hour, gmt_time->tm_min, gmt_time->tm_sec, Msg );
  15. };
  16. };