Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/filesys_log.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6769 by maya, Mon Jun 5 08:37:56 2017 UTC revision 6770 by maya, Mon Jun 5 08:39:19 2017 UTC
# Line 983  void LogToFile() Line 983  void LogToFile()
983                  {                  {
984                          if (((cv.FilePause & OpLog)==0) && (! cv.ProtoFlag))                          if (((cv.FilePause & OpLog)==0) && (! cv.ProtoFlag))
985                          {                          {
                                 // 時刻を書き出す(2006.7.23 maya)  
                                 // 日付フォーマットを日本ではなく世界標準に変更した (2006.7.23 yutaka)  
                                 /* 2007.05.24 Gentaro */  
                                 // ミリ秒も表示するように変更 (2009.5.23 maya)  
986                                  if ( ts.LogTimestamp && eLineEnd ) {                                  if ( ts.LogTimestamp && eLineEnd ) {
         #if 1  
         #if 0  
                                         SYSTEMTIME      LocalTime;  
                                         GetLocalTime(&LocalTime);  
                                         char strtime[27];  
   
                                         // format time  
                                         sprintf(strtime, "[%04d/%02d/%02d %02d:%02d:%02d.%03d] ",  
                                                         LocalTime.wYear, LocalTime.wMonth,LocalTime.wDay,  
                                                         LocalTime.wHour, LocalTime.wMinute, LocalTime.wSecond,  
                                                         LocalTime.wMilliseconds);  
         #else  
987                                          char *strtime = mctimelocal(ts.LogTimestampFormat, ts.LogTimestampUTC);                                          char *strtime = mctimelocal(ts.LogTimestampFormat, ts.LogTimestampUTC);
         #endif  
         #else  
                                                 time_t tick = time(NULL);  
                                                 char *strtime = ctime(&tick);  
         #endif  
                                         /* 2007.05.24 Gentaro */  
                                         if( eLineEnd == Line_FileHead ){  
                                                 WriteFile((HANDLE)LogVar->FileHandle, "\r\n", 2, &wrote, NULL);  
                                         }  
988                                          WriteFile((HANDLE)LogVar->FileHandle, "[", 1, &wrote, NULL);                                          WriteFile((HANDLE)LogVar->FileHandle, "[", 1, &wrote, NULL);
989                                          WriteFile((HANDLE)LogVar->FileHandle, strtime, strlen(strtime), &wrote, NULL);                                          WriteFile((HANDLE)LogVar->FileHandle, strtime, strlen(strtime), &wrote, NULL);
990                                          WriteFile((HANDLE)LogVar->FileHandle, "] ", 2, &wrote, NULL);                                          WriteFile((HANDLE)LogVar->FileHandle, "] ", 2, &wrote, NULL);

Legend:
Removed from v.6769  
changed lines
  Added in v.6770

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26