From 9a1f574283804faa6dbba9165a40558e1a6a1f13 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 4 Jan 2013 13:00:56 -0800 Subject: [PATCH] osd: drop newlines from event descriptions These produce extra newlines in the log. Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- src/osd/PG.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/osd/PG.h b/src/osd/PG.h index bc67ef6ea2c98..bafdeeabe46ed 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1022,7 +1022,7 @@ public: Formatter *f; QueryState(Formatter *f) : f(f) {} void print(std::ostream *out) const { - *out << "Query" << std::endl; + *out << "Query"; } }; @@ -1033,9 +1033,7 @@ public: MInfoRec(int from, pg_info_t &info, epoch_t msg_epoch) : from(from), info(info), msg_epoch(msg_epoch) {} void print(std::ostream *out) const { - *out << "MInfoRec from " << from - << " info: " << info - << std::endl; + *out << "MInfoRec from " << from << " info: " << info; } }; @@ -1045,8 +1043,7 @@ public: MLogRec(int from, MOSDPGLog *msg) : from(from), msg(msg) {} void print(std::ostream *out) const { - *out << "MLogRec from " << from - << std::endl; + *out << "MLogRec from " << from; } }; @@ -1056,9 +1053,7 @@ public: MNotifyRec(int from, pg_notify_t ¬ify) : from(from), notify(notify) {} void print(std::ostream *out) const { - *out << "MNotifyRec from " << from - << " notify: " << notify - << std::endl; + *out << "MNotifyRec from " << from << " notify: " << notify; } }; @@ -1071,8 +1066,7 @@ public: void print(std::ostream *out) const { *out << "MQuery from " << from << " query_epoch " << query_epoch - << " query: " << query - << std::endl; + << " query: " << query; } }; @@ -1083,14 +1077,14 @@ public: AdvMap(OSDMapRef osdmap, OSDMapRef lastmap, vector& newup, vector& newacting): osdmap(osdmap), lastmap(lastmap), newup(newup), newacting(newacting) {} void print(std::ostream *out) const { - *out << "AdvMap" << std::endl; + *out << "AdvMap"; } }; struct ActMap : boost::statechart::event< ActMap > { ActMap() : boost::statechart::event< ActMap >() {} void print(std::ostream *out) const { - *out << "ActMap" << std::endl; + *out << "ActMap"; } }; struct Activate : boost::statechart::event< Activate > { @@ -1098,13 +1092,13 @@ public: Activate(epoch_t q) : boost::statechart::event< Activate >(), query_epoch(q) {} void print(std::ostream *out) const { - *out << "Activate from " << query_epoch << std::endl; + *out << "Activate from " << query_epoch; } }; #define TrivialEvent(T) struct T : boost::statechart::event< T > { \ T() : boost::statechart::event< T >() {} \ void print(std::ostream *out) const { \ - *out << #T << std::endl; \ + *out << #T; \ } \ }; TrivialEvent(Initialize) -- 2.39.5