Logs fixed
[framework/web/wrt-installer.git] / src / jobs / widget_install / job_widget_install.cpp
index a1da7ac..ca3feb3 100755 (executable)
@@ -528,22 +528,22 @@ ConfigParserData JobWidgetInstall::getWidgetDataFromXML(
     }
     Catch(DPL::ZipInput::Exception::OpenFailed)
     {
-        LogDebug("Failed to open widget package");
+        LogError("Failed to open widget package");
         return ConfigParserData();
     }
     Catch(DPL::ZipInput::Exception::OpenFileFailed)
     {
-        LogDebug("Failed to open config.xml file");
+        LogError("Failed to open config.xml file");
         return ConfigParserData();
     }
     Catch(DPL::CopyFailed)
     {
-        LogDebug("Failed to extract config.xml file");
+        LogError("Failed to extract config.xml file");
         return ConfigParserData();
     }
     Catch(ElementParser::Exception::ParseError)
     {
-        LogDebug("Failed to parse config.xml file");
+        LogError("Failed to parse config.xml file");
         return ConfigParserData();
     }
 }
@@ -560,7 +560,7 @@ WidgetUpdateInfo JobWidgetInstall::detectWidgetUpdate(
     widgetGUID = configInfo.widget_id;
 
     if (widgetGUID.IsNull()) {
-        LogDebug("Installed widget has no GUID");
+        LogWarning("Installed widget has no GUID");
         return WidgetUpdateInfo();
     }
 
@@ -748,7 +748,7 @@ WrtDB::PackagingType JobWidgetInstall::checkPackageType(
     }
     Catch(DPL::ZipInput::Exception::OpenFailed)
     {
-        LogDebug("Failed to open widget package");
+        LogError("Failed to open widget package");
         return PKG_TYPE_UNKNOWN;
     }
 
@@ -761,7 +761,7 @@ WrtDB::PackagingType JobWidgetInstall::checkPackageType(
     }
     Catch(DPL::ZipInput::Exception::OpenFileFailed)
     {
-        LogDebug("Could not find config.xml");
+        LogWarning("Could not find ./config.xml");
     }
 
     Try
@@ -770,6 +770,7 @@ WrtDB::PackagingType JobWidgetInstall::checkPackageType(
         std::unique_ptr<DPL::ZipInput::File> configFile(
                 zipFile->OpenFile(WITH_OSP_XML));
         if (pType == PKG_TYPE_TIZEN_WEBAPP) {
+            LogWarning("Two config.xml's found. Application type is unknown.");
             return PKG_TYPE_UNKNOWN;
         }
 
@@ -777,10 +778,12 @@ WrtDB::PackagingType JobWidgetInstall::checkPackageType(
     }
     Catch(DPL::ZipInput::Exception::OpenFileFailed)
     {
-        LogDebug("Could not find wgt/config.xml");
-        return PKG_TYPE_UNKNOWN;
+        LogWarning("Could not find ./res/wgt/config.xml");
     }
 
+    if (pType == PKG_TYPE_UNKNOWN) {
+        LogWarning("config.xml not found. Application type is unknown.");
+    }
     return pType;
 }