diff options
Diffstat (limited to 'src/components/resumption/src/last_state.cc')
-rw-r--r-- | src/components/resumption/src/last_state.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/resumption/src/last_state.cc b/src/components/resumption/src/last_state.cc index 15100c3e13..7d609fe84f 100644 --- a/src/components/resumption/src/last_state.cc +++ b/src/components/resumption/src/last_state.cc @@ -40,7 +40,7 @@ namespace resumption { CREATE_LOGGERPTR_GLOBAL(logger_, "LastState"); void LastState::SaveToFileSystem() { - LOG4CXX_INFO(logger_, "LastState::SaveToFileSystem"); + LOG4CXX_AUTO_TRACE(logger_); const std::string file = profile::Profile::instance()->app_info_storage(); const std::string& str = dictionary.toStyledString(); @@ -50,8 +50,11 @@ void LastState::SaveToFileSystem() { DCHECK(file_system::CreateDirectoryRecursively( profile::Profile::instance()->app_storage_folder())); - LOG4CXX_INFO(logger_, "LastState::SaveToFileSystem " << file); + LOG4CXX_INFO(logger_, "LastState::SaveToFileSystem " << file + << str); + DCHECK(file_system::Write(file, char_vector_pdata)); + } void LastState::LoadFromFileSystem() { @@ -61,7 +64,8 @@ void LastState::LoadFromFileSystem() { bool result = file_system::ReadFile(file, buffer); Json::Reader m_reader; if (result && m_reader.parse(buffer, dictionary)) { - LOG4CXX_INFO(logger_, "Valid last state was found."); + LOG4CXX_INFO(logger_, "Valid last state was found." + << dictionary.toStyledString()); return; } LOG4CXX_WARN(logger_, "No valid last state was found."); |