API Documentation
00001 // Module: Log4CPLUS 00002 // File: loglog.h 00003 // Created: 6/2001 00004 // Author: Tad E. Smith 00005 // 00006 // 00007 // Copyright (C) Tad E. Smith All rights reserved. 00008 // 00009 // This software is published under the terms of the Apache Software 00010 // License version 1.1, a copy of which has been included with this 00011 // distribution in the LICENSE.APL file. 00012 // 00013 00016 #ifndef _LOG4CPLUS_HELPERS_LOGLOG 00017 #define _LOG4CPLUS_HELPERS_LOGLOG 00018 00019 #include <log4cplus/config.h> 00020 #include <log4cplus/tstring.h> 00021 #include <log4cplus/helpers/pointer.h> 00022 #include <log4cplus/helpers/threads.h> 00023 00024 00025 namespace log4cplus { 00026 namespace helpers { 00027 00041 class LOG4CPLUS_EXPORT LogLog : public log4cplus::helpers::SharedObject { 00042 public: 00043 // Static methods 00047 static log4cplus::helpers::SharedObjectPtr<LogLog> getLogLog(); 00048 00049 00053 void setInternalDebugging(bool enabled); 00054 00061 void setQuietMode(bool quietMode); 00062 00067 void debug(const log4cplus::tstring& msg); 00068 00074 void error(const log4cplus::tstring& msg); 00075 00081 void warn(const log4cplus::tstring& msg); 00082 00083 // Dtor 00084 virtual ~LogLog(); 00085 00086 // Data 00087 LOG4CPLUS_MUTEX_PTR_DECLARE mutex; 00088 00089 private: 00090 // Data 00091 bool debugEnabled; 00092 bool quietMode; 00093 const log4cplus::tstring PREFIX; 00094 const log4cplus::tstring WARN_PREFIX; 00095 const log4cplus::tstring ERR_PREFIX; 00096 00097 // Ctors 00098 LogLog(); 00099 LogLog(const LogLog&); 00100 }; 00101 00102 } // end namespace helpers 00103 } // end namespace log4cplus 00104 00105 00106 #endif // _LOG4CPLUS_HELPERS_LOGLOG 00107