diff --git a/ChangeLog b/ChangeLog index 2e86ab6c..f3b5091b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-03 Tatsuhiro Tsujikawa + + Added log message when cookies are loaded. Added filename to log + message when serializing session. + * src/MultiUrlRequestInfo.cc + 2010-06-03 Tatsuhiro Tsujikawa Treat SIGHUP and SIGTERM signal as emergency shutdown because they diff --git a/src/MultiUrlRequestInfo.cc b/src/MultiUrlRequestInfo.cc index b152b453..942caa33 100644 --- a/src/MultiUrlRequestInfo.cc +++ b/src/MultiUrlRequestInfo.cc @@ -126,10 +126,11 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute() if(!_option->blank(PREF_LOAD_COOKIES)) { File cookieFile(_option->get(PREF_LOAD_COOKIES)); if(cookieFile.isFile()) { - e->getCookieStorage()->load(_option->get(PREF_LOAD_COOKIES)); + e->getCookieStorage()->load(cookieFile.getPath()); + _logger->info("Loaded cookies from '%s'.", + cookieFile.getPath().c_str()); } else { - _logger->error(MSG_LOADING_COOKIE_FAILED, - _option->get(PREF_LOAD_COOKIES).c_str()); + _logger->error(MSG_LOADING_COOKIE_FAILED, cookieFile.getPath().c_str()); } } @@ -212,10 +213,13 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute() SessionSerializer sessionSerializer(e->_requestGroupMan); // TODO Add option: --save-session-status=error,inprogress,waiting if(!_option->blank(PREF_SAVE_SESSION)) { - if(sessionSerializer.save(_option->get(PREF_SAVE_SESSION))) { - _logger->notice("Serialized session successfully."); + const std::string& filename = _option->get(PREF_SAVE_SESSION); + if(sessionSerializer.save(filename)) { + _logger->notice("Serialized session to '%s' successfully.", + filename.c_str()); } else { - _logger->notice("Failed to serialize session."); + _logger->notice("Failed to serialize session to '%s'.", + filename.c_str()); } } } catch(RecoverableException& e) {