Dlog Print Format Updates 57/195257/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/5.5/unified/20191031.024939 accepted/tizen/5.5/unified/mobile/hotfix/20201027.084543 accepted/tizen/unified/20181217.142121 submit/tizen/20181212.095503 submit/tizen/20181214.061228 submit/tizen_5.5/20191031.000003 submit/tizen_5.5_mobile_hotfix/20201026.185103 tizen_5.5.m2_release
authorDewal Agarwal <d1.agarwal@samsung.com>
Wed, 12 Dec 2018 04:28:32 +0000 (09:58 +0530)
committerDewal Agarwal <d1.agarwal@samsung.com>
Wed, 12 Dec 2018 04:28:32 +0000 (09:58 +0530)
Change-Id: Iec413cc38ade06da004512e3058834c8eb5c9ef4
Signed-off-by: Dewal Agarwal <d1.agarwal@samsung.com>
src/server/battery-stats/BatteryMonitor.cpp
src/server/usage-stats/ActiveWindowMonitor.cpp

index 6bb52e1..d2d6ec0 100644 (file)
@@ -111,16 +111,16 @@ bool BatteryMonitor::__loadLastInfo()
        if (!charging && percent == 100) {      // Fully charged
                __lastFullTime = currentTime;
                __lastHeartAccessTime = currentTime;
-               _I("Fully charged. Last fully charged time: %d", __lastFullTime);
+               _I("Fully charged. Last fully charged time: %lld",(long long int)__lastFullTime);
                __updateLastInfo();
        } else if (__lastFullTime == 0) {       // Never fully charged yet
                __lastFullTime = currentTime;
-               _I("Device has not fully charged until now. Start time of recent battery usage will be %d", __lastFullTime);
+               _I("Device has not fully charged until now. Start time of recent battery usage will be %lld",(long long int)__lastFullTime);
                __updateLastInfo();
        } else if (__lastFullTime > currentTime || currentTime - __lastFullTime > LOG_RETENTION_PERIOD) {
                __lastFullTime = currentTime;
                __lastHeartAccessTime = currentTime;
-               _I("Last fully charged time changed: %d", __lastFullTime);
+               _I("Last fully charged time changed: %lld", (long long int)__lastFullTime);
                __updateLastInfo();
        }
 
@@ -155,7 +155,7 @@ void BatteryMonitor::__chargerChangeCb(device_callback_e type, void* value, void
        __needSync = true;
 
        instance->__lastFullTime = CURRENT_TIME;
-       _I("Charger is disconnected after fully charged. Last fully charged time: %d", instance->__lastFullTime);
+       _I("Charger is disconnected after fully charged. Last fully charged time: %lld", (long long int)instance->__lastFullTime);
 
        if (!instance->__updateLastInfo())
                _E("Failed to update last reset time and last percent time");
@@ -263,7 +263,7 @@ bool BatteryMonitor::__processBatteryUsage()
                __lastHeartAccessTime = currentTime - DEFAULT_TIME_DIFF;
                __lastFullTime = currentTime - DEFAULT_TIME_DIFF;
                __updateLastInfo();
-               _W("Last fully charged time & last heart access time changed(%d)", __lastFullTime);
+               _W("Last fully charged time & last heart access time changed(%lld)", (long long int)__lastFullTime);
        }
 
        // Read from heart cpu table
@@ -276,7 +276,7 @@ bool BatteryMonitor::__processBatteryUsage()
 
        IF_FAIL_RETURN_TAG(ret, true, _E, "Cannot read from heart cpu table");
        IF_FAIL_RETURN_TAG(heartCpuLog.size() > 0, true, _W, "Heart cpu data is not prepared");
-       _D("Read %d rows from heart cpu table from %d", heartCpuLog.size(), __lastHeartAccessTime);
+       _D("Read %zd rows from heart cpu table from %ld", heartCpuLog.size(),(long int)__lastHeartAccessTime);
 
        __lastHeartAccessTime = heartCpuLog.back()[BATTERY_TIMESTAMP].asInt64();
        __updateLastInfo();
@@ -336,7 +336,7 @@ bool BatteryMonitor::__insertBatteryUsageLog(std::vector<Json::Value>& usage)
                        + " WHERE EndTime < " + std::to_string(CURRENT_TIME - LOG_RETENTION_PERIOD)
                        + " OR EndTime > " + std::to_string(CURRENT_TIME) + ";";
 
-       _D("Insert %d rows of per app battery usage", usage.size());
+       _D("Insert %zd rows of per app battery usage", usage.size());
        return __database->execute(query.c_str(), NULL);
 }
 
@@ -369,7 +369,7 @@ bool BatteryMonitor::__updateLastCpuUsageLog(CpuUsageMap& usage)
                query += ", ";
        }
 
-       _D("Insert %d rows in app last times table", usage.size());
+       _D("Insert %lu rows in app last times table", (long unsigned)usage.size());
        query = query.substr(0, query.size() - 2);
        return __database->execute(query.c_str(), NULL);
 }
index 3241f34..a04ad30 100644 (file)
@@ -100,7 +100,7 @@ ctx::AppUseMonitor::~AppUseMonitor()
 bool ctx::AppUseMonitor::__startLogging()
 {
        __signalId = __dbusMonitor.subscribe(NULL, "/Org/Tizen/Aul/AppStatus", "org.tizen.aul.AppStatus", "AppStatusChange", this);
-       _D("Active window monitoring started (%lld)", __signalId);
+       _D("Active window monitoring started (%lld)", (long long int)__signalId);
        return (__signalId > 0);
 }