From: Lars Op den Kamp Date: Wed, 25 Apr 2012 13:21:16 +0000 (+0200) Subject: cec: also log the libCEC version in the 'connected to the CEC adapter' log entry... X-Git-Tag: upstream/2.2.0~1^2~29^2^2~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8264e68bfabdf1b706fe37d2fa8e3e4d9679a9a9;p=deb_libcec.git cec: also log the libCEC version in the 'connected to the CEC adapter' log entry, and add the firmware build date to the line if it's available, so all relevant version info is available in 1 log line. log the firmware build date in GMT, not local time --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 68823d1..32f9947 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -189,13 +189,15 @@ bool CCECProcessor::OpenConnection(const char *strPort, uint16_t iBaudRate, uint { m_configuration.iFirmwareVersion = m_communication->GetFirmwareVersion(); uint32_t iBuildDate = m_communication->GetFirmwareBuildDate(); - CLibCEC::AddLog(CEC_LOG_NOTICE, "connected to the CEC adapter. firmware version = %d, client version = %s", m_configuration.iFirmwareVersion, ToString((cec_client_version)m_configuration.clientVersion)); + CStdString strLog; + strLog.Format("connected to the CEC adapter. libCEC version = %s, client version = %s, firmware version = %d", ToString((cec_server_version)m_configuration.serverVersion), ToString((cec_client_version)m_configuration.clientVersion), m_configuration.iFirmwareVersion); if (iBuildDate > 0) { time_t buildTime = (time_t)iBuildDate; - CLibCEC::AddLog(CEC_LOG_NOTICE, "Firmware build date: %s", asctime(localtime(&buildTime))); + strLog.AppendFormat(", firmware build date: %s +0000", asctime(gmtime(&buildTime))); + strLog = strLog.Left(strLog.length() - 1); // strip \n added by asctime } - + CLibCEC::AddLog(CEC_LOG_NOTICE, strLog); } if (m_configuration.bGetSettingsFromROM == 1)