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/src/IceE/LoggerUtil.cpp | |
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/src/IceE/LoggerUtil.cpp')
-rw-r--r-- | cppe/src/IceE/LoggerUtil.cpp | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/cppe/src/IceE/LoggerUtil.cpp b/cppe/src/IceE/LoggerUtil.cpp new file mode 100644 index 00000000000..5d801214387 --- /dev/null +++ b/cppe/src/IceE/LoggerUtil.cpp @@ -0,0 +1,120 @@ +// ********************************************************************** +// +// 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. +// +// ********************************************************************** + +#include <IceE/LoggerUtil.h> +#include <IceE/Logger.h> + +using namespace std; +using namespace IceE; +using namespace IceEInternal; + +IceE::Print::Print(const LoggerPtr& logger) : + _logger(logger) +{ +} + +IceE::Print::~Print() +{ + flush(); +} + +void +IceE::Print::flush() +{ + if(!_str.empty()) + { + _logger->print(_str); + } + _str = "";; +} + +string& +IceE::Print::__str() +{ + return _str; +} + +IceE::Warning::Warning(const LoggerPtr& logger) : + _logger(logger) +{ +} + +IceE::Warning::~Warning() +{ + flush(); +} + +void +IceE::Warning::flush() +{ + if(!_str.empty()) + { + _logger->warning(_str); + } + _str = ""; +} + +string& +IceE::Warning::__str() +{ + return _str; +} + +IceE::Error::Error(const LoggerPtr& logger) : + _logger(logger) +{ +} + +IceE::Error::~Error() +{ + flush(); +} + +void +IceE::Error::flush() +{ + if(!_str.empty()) + { + _logger->error(_str); + } + _str = ""; +} + +string& +IceE::Error::__str() +{ + return _str; +} + +IceE::Trace::Trace(const LoggerPtr& logger, const string& category) : + _logger(logger), + _category(category) +{ +} + +IceE::Trace::~Trace() +{ + flush(); +} + +void +IceE::Trace::flush() +{ + if(!_str.empty()) + { + _logger->trace(_category, _str); + } + _str = ""; +} + +string& +IceE::Trace::__str() +{ + return _str; +} |