// limitations under the License.
//
-
#include "JSCalendarRecurrenceRule.h"
-#include <dpl/log/log.h>
#include <JSTizenException.h>
#include <JSTizenExceptionFactory.h>
#include <CommonsJavaScript/Converter.h>
#include "CalendarConverter.h"
#include <TimeUtilConverter.h>
#include <JSTZDate.h>
-
#include <GlobalContextManager.h>
+#include <Logger.h>
using namespace WrtDeviceApis::Commons;
using namespace WrtDeviceApis::CommonsJavaScript;
void JSCalendarRecurrenceRule::initialize(JSContextRef context, JSObjectRef object)
{
if (!JSObjectGetPrivate(object)) {
- LogDebug("Create calendar rrule private object.");
+ LoggerD("Create calendar rrule private object.");
EventRecurrenceRulePtr rrule( new EventRecurrenceRule() );
RecurrenceRulePrivateObject *priv = new RecurrenceRulePrivateObject(context, rrule);
if (!JSObjectSetPrivate(object, static_cast<void*>(priv))) {
delete priv;
}
} else {
- LogDebug("Private object already set.");
+ LoggerD("Private object already set.");
}
}
}
Catch(Exception)
{
- LogError("Error during replacing rrule object.");
+ LoggerE("Error during replacing rrule object.");
}
}
}
Catch(UnsupportedException)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
}
Catch(InvalidArgumentException)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
}
Catch(ConversionException)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
}
Catch(Exception)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
*exception = JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
if(rrule->getDaysOfTheWeekJSRef()) {
return rrule->getDaysOfTheWeekJSRef();
} else {
- LogDebug("Create a JS object for daysOfTheWeek.");
+ LoggerD("Create a JS object for daysOfTheWeek.");
StringArrayPtr daysOfTheWeek = rrule->getDaysOfTheWeek();
JSValueRef jsDaysOfTheWeek = converter.toJSValueRefStringArray(daysOfTheWeek);
rrule->setDaysOfTheWeekJSRef(converter.toJSObjectRef(jsDaysOfTheWeek));
if(rrule->getSetPositionsJSRef()) {
return rrule->getSetPositionsJSRef();
} else {
- LogDebug("Create a JS object for setPositions.");
+ LoggerD("Create a JS object for setPositions.");
NumberArrayPtr setPositions = rrule->getSetPositions();
JSValueRef jsSetPositions = converter.toJSValueRefNumberArray(setPositions);
rrule->setSetPositionsJSRef(converter.toJSObjectRef(jsSetPositions));
if(rrule->getExceptionsJSRef()) {
return rrule->getExceptionsJSRef();
} else {
- LogDebug("Create a JS object for exceptions with time zone: "<<rrule->getTimeZone());
+ LoggerD("Create a JS object for exceptions with time zone: "<<rrule->getTimeZone());
NumberArrayPtr exceptions = rrule->getExceptions();
JSValueRef jsExceptions = converter.toJSValueRefTZDateArray(exceptions, rrule->getTimeZone());
rrule->setExceptionsJSRef(converter.toJSObjectRef(jsExceptions));
}
Catch(Exception)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
}
return JSValueMakeUndefined(context);
}
}
Catch(Exception)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
}
return true;