From: Krzysztof Jackiewicz Date: Thu, 25 Oct 2012 17:56:08 +0000 (+0200) Subject: Logs fixed X-Git-Tag: submit/trunk/20121102.073326~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cb89d000e52b3b243c3af800c10ac3a80fe68e3;p=platform%2Fframework%2Fweb%2Fwrt-installer.git Logs fixed [Issue#] N/A [Bug] Many logs that informed about errors are not visible [Problem] N/A [Cause] They were printed using LogDebug [Solution] LogDebug changed to LogWarning/Error [Verification] Successfull compilation. Go through commit changes and see if modified cases are really errors. Change-Id: I285487e950a2d2c333cb844c744b79118a13c205 --- diff --git a/src/jobs/widget_install/job_widget_install.cpp b/src/jobs/widget_install/job_widget_install.cpp index a1da7ac..ca3feb3 100755 --- a/src/jobs/widget_install/job_widget_install.cpp +++ b/src/jobs/widget_install/job_widget_install.cpp @@ -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 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; } diff --git a/src/jobs/widget_install/task_ace_check.cpp b/src/jobs/widget_install/task_ace_check.cpp index 6f45eaa..a8a6a6e 100644 --- a/src/jobs/widget_install/task_ace_check.cpp +++ b/src/jobs/widget_install/task_ace_check.cpp @@ -176,7 +176,7 @@ void TaskAceCheck::StepCheckAceResponse() { LogInfo("Checking ACE response"); if (m_context.featureLogic->isRejected()) { - LogDebug("Installation failure. Some devCap was not accepted by ACE."); + LogError("Installation failure. Some devCap was not accepted by ACE."); ThrowMsg(Exceptions::NotAllowed, "Instalation failure. " "Some deviceCap was not accepted by ACE."); } diff --git a/src/jobs/widget_install/task_certify.cpp b/src/jobs/widget_install/task_certify.cpp index a958288..f060447 100755 --- a/src/jobs/widget_install/task_certify.cpp +++ b/src/jobs/widget_install/task_certify.cpp @@ -277,7 +277,7 @@ void TaskCertify::stepSignature() data.getStorageType().contains(CertStoreId::DEVELOPER); if (testCertificate && !developerMode) { - LogDebug("Widget signed by test certificate, " + LogError("Widget signed by test certificate, " "but developer mode is off."); ThrowMsg(Exceptions::InvalidPackage, "Widget signed by test certificate, " @@ -285,12 +285,12 @@ void TaskCertify::stepSignature() } m_contextData.widgetConfig.isTestWidget = testCertificate; } Catch(ParserSchemaException::Base) { - LogDebug("Error occured in ParserSchema."); + LogError("Error occured in ParserSchema."); ReThrowMsg(Exceptions::InvalidPackage, "Error occured in ParserSchema."); } Catch(DeveloperModeValidator::Exception::Base) { - LogDebug("Cannot validate developer certificate."); + LogError("Cannot validate developer certificate."); ReThrowMsg(Exceptions::InvalidPackage, "Cannot validate developer certificate."); } diff --git a/src/jobs/widget_install/task_database.cpp b/src/jobs/widget_install/task_database.cpp index 6117b4e..759112b 100644 --- a/src/jobs/widget_install/task_database.cpp +++ b/src/jobs/widget_install/task_database.cpp @@ -77,12 +77,12 @@ void TaskDatabase::StepDBInsert() } Catch(WidgetDAO::Exception::DatabaseError) { - LogWarning("Database failure!"); + LogError("Database failure!"); ReThrowMsg(Exceptions::InsertNewWidgetFailed, "Database failure!"); } Catch(DPL::DB::SqlConnection::Exception::Base) { - LogDebug("Database failure!"); + LogError("Database failure!"); ReThrowMsg(Exceptions::InsertNewWidgetFailed, "Database failure!"); } diff --git a/src/jobs/widget_install/task_encrypt_resource.cpp b/src/jobs/widget_install/task_encrypt_resource.cpp index dcec387..cbcf554 100644 --- a/src/jobs/widget_install/task_encrypt_resource.cpp +++ b/src/jobs/widget_install/task_encrypt_resource.cpp @@ -147,7 +147,7 @@ void TaskEncryptResource::EncryptFile(const std::string &fileName) FILE* resFp = fopen(fileName.c_str(), "r"); if ( NULL == resFp) { - LogDebug("Couldnot open file : " << fileName); + LogError("Couldnot open file : " << fileName); return; } diff --git a/src/jobs/widget_install/task_manifest_file.cpp b/src/jobs/widget_install/task_manifest_file.cpp index 7951e2e..0c97454 100644 --- a/src/jobs/widget_install/task_manifest_file.cpp +++ b/src/jobs/widget_install/task_manifest_file.cpp @@ -369,11 +369,11 @@ void TaskManifestFile::updateAilInfo() if (AIL_ERROR_NO_DATA == ret) { if (ail_desktop_add(pkgname) < 0) { - LogDebug("Failed to add ail desktop : " << pkgname); + LogWarning("Failed to add ail desktop : " << pkgname); } } else if (AIL_ERROR_OK == ret) { if (ail_desktop_update(pkgname) < 0) { - LogDebug("Failed to update ail desktop : " << pkgname); + LogWarning("Failed to update ail desktop : " << pkgname); } } } diff --git a/src/jobs/widget_install/task_plugins_copy.cpp b/src/jobs/widget_install/task_plugins_copy.cpp index a0fbecc..528f12e 100644 --- a/src/jobs/widget_install/task_plugins_copy.cpp +++ b/src/jobs/widget_install/task_plugins_copy.cpp @@ -96,7 +96,7 @@ void TaskPluginsCopy::StepFindPlugins() while ((entry = readdir(dir)) != NULL){ tempname = m_npsource + "/" + entry->d_name; if(lstat(tempname.c_str(), &st) != 0) { - LogDebug("Failed to call \"lstat\" (errno:" <m_returnStatus = -1; if (This->popupsEnabled()) {