//
#include <memory>
-#include <dpl/log/log.h>
#include "JSBatteryInfo.h"
+#include <Logger.h>
namespace DeviceAPI {
namespace Systeminfo {
void JSBatteryInfo::Finalize(JSObjectRef object)
{
- LogDebug("Entered");
+ LoggerD("Entered");
JSBatteryPriv* priv = static_cast<JSBatteryPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LogDebug("Deleting batteryInfo object");
+ LoggerD("Deleting batteryInfo object");
delete priv;
}
JSObjectRef JSBatteryInfo::createJSObject(JSContextRef context, const BatteryPropertiesPtr batteryInfo)
{
- LogDebug("test");
+ LoggerD("test");
JSBatteryPriv *priv = new JSBatteryPriv(context, batteryInfo);
return JSObjectMake(context, getClassRef(), priv);
}
JSValueRef JSBatteryInfo::getProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
- LogDebug("Enter");
+ LoggerD("Enter");
JSBatteryPriv *priv = static_cast<JSBatteryPriv*>(JSObjectGetPrivate(object));
if (NULL == priv) {
- LogError("Private object not set.");
+ LoggerE("Private object not set.");
return JSValueMakeUndefined(context);
}
}
Catch(Exception)
{
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
return JSValueMakeUndefined(context);
}