From: Alex Rousskov Date: Sun, 30 Jan 2011 02:19:26 +0000 (-0700) Subject: Added stream operator << for StoreEntry to ease debugging. X-Git-Tag: take01~20^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c4cd1ad0f52ee3928ea2e57f9ecbd209111850b;p=thirdparty%2Fsquid.git Added stream operator << for StoreEntry to ease debugging. --- diff --git a/src/Store.h b/src/Store.h index b3ba501b1d..6f661952b0 100644 --- a/src/Store.h +++ b/src/Store.h @@ -208,6 +208,8 @@ private: bool hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) const; }; +std::ostream &operator <<(std::ostream &os, const StoreEntry &e); + /// \ingroup StoreAPI class NullStoreEntry:public StoreEntry { diff --git a/src/store.cc b/src/store.cc index 332e2d0783..dbe9007c1b 100644 --- a/src/store.cc +++ b/src/store.cc @@ -2021,6 +2021,13 @@ StoreEntry::isAccepting() const return true; } +std::ostream &operator <<(std::ostream &os, const StoreEntry &e) +{ + return os << e.swap_filen << '@' << e.swap_dirn << '=' << + e.mem_status << '/' << e.ping_status << '/' << e.store_status << '/' << + e.swap_status; +} + /* NullStoreEntry */ NullStoreEntry NullStoreEntry::_instance;