Page 1 of 1

Put date/time in logfile header

Posted: Fri Sep 30, 2011 6:15 pm
by Torque
As per title, would be nice to have this information in the .log

Cheers ..

Re: Put date/time in logfile header

Posted: Fri Sep 30, 2011 7:48 pm
by CoZZm0
date and time is on the file creation itself, unless you modify and save the file i guess.

Re: Put date/time in logfile header

Posted: Sat Oct 01, 2011 4:04 am
by Torque
True, but that can be changed/lost etc.
I look at this from Excel, and it would be nice to have it in there (included is already the image name, so date / time would be helpful)

Re: Put date/time in logfile header

Posted: Fri Mar 23, 2012 12:12 am
by Matt
// Get date / time into log header for Torque :P
CTime currtime = CTime::GetCurrentTime();

CString timestring;
timestring.Format(_T(" %02d/%02d/%04d::%02d:%02d:%02d"),
currtime.GetMonth(),
currtime.GetDay(),
currtime.GetYear(),
currtime.GetHour(),
currtime.GetMinute(),
currtime.GetSecond());

CString dline = "DESC: " + GetDocument()->m_pAddress->ecu_adr_desc + " : " +
GetDocument()->m_pImageHdlr->imagemgr[curimg].description + timestring + _T("\r\n");

h_consult_log.Write(dline.GetBuffer(0), dline.GetLength());
8)

DESC: HCR32 SKYLINE (RB20DET) : HCR32_RB20DET_04U11_AT_MECR109 03/22/2012::23:42:21

Re: Put date/time in logfile header

Posted: Fri Mar 23, 2012 12:13 am
by Matt
Actually why is the month first... rearranging

Re: Put date/time in logfile header

Posted: Fri Mar 23, 2012 1:38 am
by Torque
Good stuff!
:)