16 #ifndef __Ice_Logger_h__
17 #define __Ice_Logger_h__
31 #ifndef ICE_IGNORE_VERSION
32 # if ICE_INT_VERSION / 100 != 307
33 # error Ice version mismatch!
35 # if ICE_INT_VERSION % 100 >= 50
36 # error Beta header file detected
38 # if ICE_INT_VERSION % 100 < 10
39 # error Ice patch level mismatch!
44 # if defined(ICE_STATIC_LIBS)
46 # elif defined(ICE_API_EXPORTS)
47 # define ICE_API ICE_DECLSPEC_EXPORT
49 # define ICE_API ICE_DECLSPEC_IMPORT
53 #ifdef ICE_CPP11_MAPPING // C++11 mapping
81 virtual void print(const ::std::string& message) = 0;
88 virtual void trace(const ::std::string& category, const ::std::string& message) = 0;
95 virtual void warning(const ::std::string& message) = 0;
102 virtual void error(const ::std::string& message) = 0;
115 virtual ::std::shared_ptr<::Ice::Logger>
cloneWithPrefix(const ::std::string& prefix) = 0;
131 using LoggerPtr = ::std::shared_ptr<Logger>;
136 #else // C++98 mapping
145 typedef ::IceInternal::Handle< Logger> LoggerPtr;
157 class ICE_API Logger :
public virtual LocalObject
161 typedef LoggerPtr PointerType;
165 #ifdef ICE_CPP11_COMPILER
167 Logger(
const Logger&) =
default;
168 Logger& operator=(
const Logger&) =
default;
176 virtual void print(const ::std::string& message) = 0;
183 virtual void trace(const ::std::string& category, const ::std::string& message) = 0;
190 virtual void warning(const ::std::string& message) = 0;
197 virtual void error(const ::std::string& message) = 0;
203 virtual ::std::string getPrefix() = 0;
210 virtual LoggerPtr cloneWithPrefix(const ::std::string& prefix) = 0;
214 inline bool operator==(
const Logger& lhs,
const Logger& rhs)
216 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
219 inline bool operator<(
const Logger& lhs,
const Logger& rhs)
221 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);