#include "JSSyncServiceInfo.h"
-
-#include <dpl/log/log.h>
#include <JSTizenException.h>
#include <JSTizenExceptionFactory.h>
#include <CommonsJavaScript/Converter.h>
#include "DataSyncConverter.h"
+#include <Logger.h>
using namespace WrtDeviceApis::Commons;
using namespace WrtDeviceApis::CommonsJavaScript;
JSObjectRef object)
{
if (!JSObjectGetPrivate(object)) {
- LogDebug("Create JSSyncServiceInfo private object.");
+ LoggerD("Create JSSyncServiceInfo private object.");
SyncServiceInfoPtr syncServiceInfo( new SyncServiceInfo() );
SyncServiceInfoPrivateObject *priv = new SyncServiceInfoPrivateObject(context, syncServiceInfo);
if (!JSObjectSetPrivate(object, static_cast<void*>(priv))) {
delete priv;
}
} else {
- LogDebug("Private object already set.");
+ LoggerD("Private object already set.");
}
}
{
SyncServiceInfoPrivateObject* priv = static_cast<SyncServiceInfoPrivateObject*>(JSObjectGetPrivate(object));
if (priv) {
- LogDebug("Deleting JSSyncServiceInfo private object.");
+ LoggerD("Deleting JSSyncServiceInfo private object.");
delete priv;
JSObjectSetPrivate(object, NULL);
}
}
Catch(Exception)
{
- LogError("Error during setting JSSyncServiceInfo object.");
+ LoggerE("Error during setting JSSyncServiceInfo object.");
}
}
syncServiceInfo->setPassword(converter.toString(arguments[4]));
}
- LogDebug("enable: "<<syncServiceInfo->getEnable()<<", serviceType: "<<syncServiceInfo->getSyncServiceType()<<", serverDatabaseUri: "<<syncServiceInfo->getServerDatabaseUri()<<", id: "<<syncServiceInfo->getId()<<", password: "<<syncServiceInfo->getPassword());
+ LoggerD("enable: "<<syncServiceInfo->getEnable()<<", serviceType: "<<syncServiceInfo->getSyncServiceType()<<", serverDatabaseUri: "<<syncServiceInfo->getServerDatabaseUri()<<", id: "<<syncServiceInfo->getId()<<", password: "<<syncServiceInfo->getPassword());
return createJSSyncServiceInfo(context, syncServiceInfo);
}
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());
}
// For a privacy reason.
return JSValueMakeNull(context);
} else {
- LogDebug("Wrong property name.");
+ LoggerD("Wrong property name.");
}
}
Catch(Exception)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
}
return JSValueMakeUndefined(context);
syncServiceInfo->setPassword(converter.toString(value));
return true;
} else {
- LogDebug("Wrong property name.");
+ LoggerD("Wrong property name.");
}
}
Catch(Exception)
{
- LogWarning("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerW("Exception: "<<_rethrown_exception.GetMessage());
}
return true;