diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
commit | 9b8cc712d4a41d71840416776bc94ee8485bb9b3 (patch) | |
tree | 7d467fdd6a66bc2b5878d82070d45adbd5c20414 /cppe/include/IceE/LoggerUtil.h | |
parent | cleaning the cache method out of ReferenceFactory (diff) | |
download | ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.bz2 ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.xz ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.zip |
Changed Ice to IceE EVERYWHERE!!!
Diffstat (limited to 'cppe/include/IceE/LoggerUtil.h')
-rw-r--r-- | cppe/include/IceE/LoggerUtil.h | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/cppe/include/IceE/LoggerUtil.h b/cppe/include/IceE/LoggerUtil.h new file mode 100644 index 00000000000..400be89aea7 --- /dev/null +++ b/cppe/include/IceE/LoggerUtil.h @@ -0,0 +1,118 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICEE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICEE_LOGGER_UTIL_H +#define ICEE_LOGGER_UTIL_H + +#include <IceE/LoggerF.h> + +namespace IceE +{ + + +class ICEE_API Print : private IceE::noncopyable +{ +public: + + Print(const LoggerPtr&); + ~Print(); + + void flush(); + + std::string& __str(); // For internal use only. Don't use in your code. + +private: + + LoggerPtr _logger; + std::string _str; +}; + +inline Print& +operator<<(Print& out, const std::string& val) +{ + out.__str() += val; + return out; +} + +class ICEE_API Warning : private IceE::noncopyable +{ +public: + + Warning(const LoggerPtr&); + ~Warning(); + + void flush(); + + std::string& __str(); // For internal use only. Don't use in your code. + +private: + + LoggerPtr _logger; + std::string _str; +}; + +inline Warning& +operator<<(Warning& out, const std::string& val) +{ + out.__str() += val; + return out; +} + +class ICEE_API Error : private IceE::noncopyable +{ +public: + + Error(const LoggerPtr&); + ~Error(); + + void flush(); + + std::string& __str(); // For internal use only. Don't use in your code. + +private: + + LoggerPtr _logger; + std::string _str; +}; + +inline Error& +operator<<(Error& out, const std::string& val) +{ + out.__str() += val; + return out; +} + +class ICEE_API Trace : private IceE::noncopyable +{ +public: + + Trace(const LoggerPtr&, const std::string&); + ~Trace(); + + void flush(); + + std::string& __str(); // For internal use only. Don't use in your code. + +private: + + LoggerPtr _logger; + std::string _category; + std::string _str; +}; + +inline Trace& +operator<<(Trace& out, const std::string& val) +{ + out.__str() += val; + return out; +} + +} + +#endif |