Changeset 44 for trunk/src/shared/Log.h
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shared/Log.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOSSERVER_LOG_H20 #define MANGOSSERVER_LOG_H21 #ifndef TRINITYCORE_LOG_H 22 #define TRINITYCORE_LOG_H 21 23 22 24 #include "Common.h" … … 54 56 const int Color_count = int(WHITE)+1; 55 57 56 class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThread::FastMutex> >58 class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ZThread::FastMutex> > 57 59 { 58 friend class MaNGOS::OperatorNew<Log>;60 friend class Trinity::OperatorNew<Log>; 59 61 Log() : raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), dberLogfile(NULL), m_colored(false) { Initialize(); } 60 62 ~Log() … … 138 140 }; 139 141 140 #define sLog MaNGOS::Singleton<Log>::Instance()142 #define sLog Trinity::Singleton<Log>::Instance() 141 143 142 #ifdef MANGOS_DEBUG143 #define DEBUG_LOG MaNGOS::Singleton<Log>::Instance().outDebug144 #ifdef TRINITY_DEBUG 145 #define DEBUG_LOG Trinity::Singleton<Log>::Instance().outDebug 144 146 #else 145 147 #define DEBUG_LOG … … 147 149 148 150 // primary for script library 149 void MANGOS_DLL_SPEC outstring_log(const char * str, ...) ATTR_PRINTF(1,2);150 void MANGOS_DLL_SPEC detail_log(const char * str, ...) ATTR_PRINTF(1,2);151 void MANGOS_DLL_SPEC debug_log(const char * str, ...) ATTR_PRINTF(1,2);152 void MANGOS_DLL_SPEC error_log(const char * str, ...) ATTR_PRINTF(1,2);153 void MANGOS_DLL_SPEC error_db_log(const char * str, ...) ATTR_PRINTF(1,2);151 void TRINITY_DLL_SPEC outstring_log(const char * str, ...) ATTR_PRINTF(1,2); 152 void TRINITY_DLL_SPEC detail_log(const char * str, ...) ATTR_PRINTF(1,2); 153 void TRINITY_DLL_SPEC debug_log(const char * str, ...) ATTR_PRINTF(1,2); 154 void TRINITY_DLL_SPEC error_log(const char * str, ...) ATTR_PRINTF(1,2); 155 void TRINITY_DLL_SPEC error_db_log(const char * str, ...) ATTR_PRINTF(1,2); 154 156 #endif