wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Calendar / CalendarUtility.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 5dd59a2..b1c4c70
 
 
 #include "CalendarUtility.h"
-
-#include <dpl/log/log.h>
-
 #include <unicode/ucal.h>
 #include <unicode/ustring.h>
 #include <unicode/ustdio.h>
 #include <unicode/udat.h>
+#include <Logger.h>
 
 namespace DeviceAPI {
 namespace Calendar {
@@ -56,22 +54,22 @@ calendar_time_s CalendarUtility::LLIToCalTime(const char* tzid, const long long
        _tzid = (UChar*)calloc(strlen(tzid) + 1, sizeof(UChar));
        if (_tzid == NULL)
        {
-               LogError("Failed to calloc");
+               LoggerE("Failed to calloc");
                return ct;
        }
        u_uastrcpy(_tzid, tzid);
 
-       LogDebug("tzid: "<<tzid);
+       LoggerD("tzid: "<<tzid);
 
        ucal = ucal_open(_tzid, u_strlen(_tzid), "en_US", UCAL_TRADITIONAL, &status);
        if (U_FAILURE(status)) {
-               LogError("ucal_open failed with "<<u_errorName(status));
+               LoggerE("ucal_open failed with "<<u_errorName(status));
                return ct;
        }
 
        ucal_setMillis(ucal, sec2ms(lli), &status);
        if (U_FAILURE(status)) {
-               LogError("ucal_setMillis failed with "<<u_errorName(status));
+               LoggerE("ucal_setMillis failed with "<<u_errorName(status));
                return ct;
        }
 
@@ -81,7 +79,7 @@ calendar_time_s CalendarUtility::LLIToCalTime(const char* tzid, const long long
 
        ct.time.date = {y, mon, d};
 
-       LogDebug("y: "<<y<<", mon: "<<mon<<", d: "<<d);
+       LoggerD("y: "<<y<<", mon: "<<mon<<", d: "<<d);
 
        ucal_close(ucal);
        if (_tzid) free(_tzid);
@@ -104,16 +102,16 @@ long long int CalendarUtility::calTimeToLLI(const char* tzid, const calendar_tim
        _tzid = (UChar*)calloc(strlen(tzid) + 1, sizeof(UChar));
        if (_tzid == NULL)
        {
-               LogError("Failed to calloc");
+               LoggerE("Failed to calloc");
                return -1;
        }
        u_uastrcpy(_tzid, tzid);
 
-       LogDebug("tzid: "<<tzid);
+       LoggerD("tzid: "<<tzid);
 
        ucal = ucal_open(_tzid, u_strlen(_tzid), "en_US", UCAL_TRADITIONAL, &status);
        if (U_FAILURE(status)) {
-               LogError("ucal_open failed with "<<u_errorName(status));
+               LoggerE("ucal_open failed with "<<u_errorName(status));
                return -1;
        }
 
@@ -124,7 +122,7 @@ long long int CalendarUtility::calTimeToLLI(const char* tzid, const calendar_tim
        ucal_close(ucal);
        if (_tzid) free(_tzid);
 
-       LogDebug("converted time: "<<lli);
+       LoggerD("converted time: "<<lli);
 
        return lli;
 }