From 8fdd0f44a52cdd3078b8bb7a6752443a16ef4d50 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Tue, 7 Dec 2010 23:17:48 -0800 Subject: [PATCH] logging: debug.h: minor cleanup Don't put std::ostream into the global namespace. Copyright update. Signed-off-by: Colin McCabe --- src/common/debug.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/debug.h b/src/common/debug.h index d11004efa6133..40cf0e5f9e800 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -3,7 +3,8 @@ /* * Ceph - scalable distributed file system * - * Copyright (C) 2004-2006 Sage Weil + * Copyright (C) 2004-2010 Sage Weil + * Copyright (C) 2010 Dreamhost * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,10 +22,9 @@ #include "Clock.h" #include -using std::ostream; // the streams -extern ostream *_dout; +extern std::ostream *_dout; extern Mutex _dout_lock; @@ -56,12 +56,11 @@ static inline void _dout_end_line() { // intentionally conflict with endl class _bad_endl_use_dendl_t { public: _bad_endl_use_dendl_t(int) {} }; static const _bad_endl_use_dendl_t endl = 0; -inline ostream& operator<<(ostream& out, _bad_endl_use_dendl_t) { +inline std::ostream& operator<<(std::ostream& out, _bad_endl_use_dendl_t) { assert(0 && "you are using the wrong endl.. use std::endl or dendl"); return out; } - // generic macros #define generic_dout(x) do { if ((x) <= g_conf.debug) {\ _dout_begin_line(x); *_dout -- 2.39.5