diff --git a/CMakeLists.txt b/CMakeLists.txt index 293a08b..c810ff9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) # Grive version. remember to update it for every new release! -set( GRIVE_VERSION "0.4.0-pre" ) +set( GRIVE_VERSION "0.4.2-pre" ) # common compile options add_definitions( -DVERSION="${GRIVE_VERSION}" ) diff --git a/libgrive/src/base/Drive.cc b/libgrive/src/base/Drive.cc index 10a194b..a8efb8a 100644 --- a/libgrive/src/base/Drive.cc +++ b/libgrive/src/base/Drive.cc @@ -129,9 +129,6 @@ void Drive::DetectChanges() Log( "Reading remote server file list", log::info ) ; std::auto_ptr feed = m_syncer->GetAll() ; - if ( m_options["log-xml"].Bool() ) - feed->EnableLog( "/tmp/file", ".xml" ) ; - while ( feed->GetNext( m_syncer->Agent() ) ) { std::for_each( @@ -144,8 +141,6 @@ void Drive::DetectChanges() { Log( "Detecting changes from last sync", log::info ) ; feed = m_syncer->GetChanges( prev_stamp+1 ) ; - if ( m_options["log-xml"].Bool() ) - feed->EnableLog( "/tmp/changes", ".xml" ) ; while ( feed->GetNext( m_syncer->Agent() ) ) { std::for_each( diff --git a/libgrive/src/base/Feed.cc b/libgrive/src/base/Feed.cc index 7ff3850..0ea834d 100644 --- a/libgrive/src/base/Feed.cc +++ b/libgrive/src/base/Feed.cc @@ -40,12 +40,4 @@ Feed::iterator Feed::end() const return m_entries.end() ; } -void Feed::EnableLog( const std::string& prefix, const std::string& suffix ) -{ - m_log.reset( new LogInfo ) ; - m_log->prefix = prefix ; - m_log->suffix = suffix ; - m_log->sequence = 0 ; -} - } // end of namespace gr::v1 diff --git a/libgrive/src/base/Feed.hh b/libgrive/src/base/Feed.hh index 8be1e55..d43c68c 100644 --- a/libgrive/src/base/Feed.hh +++ b/libgrive/src/base/Feed.hh @@ -43,16 +43,8 @@ public : virtual bool GetNext( http::Agent *http ) = 0 ; iterator begin() const ; iterator end() const ; - virtual void EnableLog( const std::string& prefix, const std::string& suffix ) ; protected : - struct LogInfo - { - std::string prefix ; - std::string suffix ; - std::size_t sequence ; - } ; - std::auto_ptr m_log ; Entries m_entries ; std::string m_next ; } ; diff --git a/libgrive/src/drive/Feed1.cc b/libgrive/src/drive/Feed1.cc index addde4b..86d59bd 100644 --- a/libgrive/src/drive/Feed1.cc +++ b/libgrive/src/drive/Feed1.cc @@ -24,7 +24,6 @@ #include "http/Agent.hh" #include "http/Header.hh" -#include "http/ResponseLog.hh" #include "http/XmlResponse.hh" #include "xml/NodeSet.hh" @@ -42,18 +41,11 @@ Feed1::Feed1( const std::string &url ): bool Feed1::GetNext( http::Agent *http ) { http::XmlResponse xrsp ; - http::ResponseLog log( &xrsp ) ; if ( m_next.empty() ) return false; - if ( m_log.get() != 0 ) - log.Reset( - m_log->prefix, - (boost::format( "-#%1%%2%" ) % m_log->sequence++ % m_log->suffix ).str(), - &xrsp ) ; - - http->Get( m_next, &log, http::Header() ) ; + http->Get( m_next, &xrsp, http::Header() ) ; xml::Node m_root = xrsp.Response() ; xml::NodeSet xe = m_root["entry"] ; diff --git a/libgrive/src/drive/Syncer1.cc b/libgrive/src/drive/Syncer1.cc index 31a331a..1374a5e 100644 --- a/libgrive/src/drive/Syncer1.cc +++ b/libgrive/src/drive/Syncer1.cc @@ -25,7 +25,6 @@ #include "http/Agent.hh" #include "http/Header.hh" -//#include "http/ResponseLog.hh" #include "http/StringResponse.hh" #include "http/XmlResponse.hh" @@ -123,7 +122,6 @@ bool Syncer1::Create( Resource *res ) hdr.Add( "Content-Type: application/atom+xml" ) ; http::XmlResponse xml ; -// http::ResponseLog log( "create", ".xml", &xml ) ; m_http->Post( uri, meta, &xml, hdr ) ; AssignIDs( res, Entry1( xml.Response() ) ) ; diff --git a/libgrive/src/drive2/Syncer2.cc b/libgrive/src/drive2/Syncer2.cc index d0f6f3c..eb5e943 100644 --- a/libgrive/src/drive2/Syncer2.cc +++ b/libgrive/src/drive2/Syncer2.cc @@ -27,7 +27,6 @@ #include "http/Download.hh" #include "http/Header.hh" #include "http/StringResponse.hh" -//#include "http/ResponseLog.hh" #include "json/ValResponse.hh" #include "json/JsonWriter.hh"