]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added stream operator << for StoreEntry to ease debugging.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 30 Jan 2011 02:19:26 +0000 (19:19 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sun, 30 Jan 2011 02:19:26 +0000 (19:19 -0700)
src/Store.h
src/store.cc

index b3ba501b1d0fd30d32c331847cc4f5b254335115..6f661952b0c32b481c246187df59b9ca43b4dc04 100644 (file)
@@ -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
 {
index 332e2d07837a5eadb267530d90de572e445f50bf..dbe9007c1b583b0b7feaa8b8f6285b17e86dc60a 100644 (file)
@@ -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;