Core/Misc: Remove the use of logging system from WPFatal (Fixes tools compile)

Closes #9501
This commit is contained in:
Spp
2013-03-26 09:44:01 +01:00
parent d03da1320a
commit 3c6c8c1117
3 changed files with 43 additions and 4 deletions

View File

@@ -1,5 +1,22 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Errors.h"
#include "Log.h"
#include <ace/Stack_Trace.h>
#include <ace/OS_NS_unistd.h>
@@ -16,7 +33,7 @@ void Assert(char const *file, int line, char const *function, char const *messag
void Fatal(char const *file, int line, char const *function, char const *message)
{
sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s FATAL ERROR:\n %s\n",
fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n %s\n",
file, line, function, message);
ACE_OS::sleep(10);
*((volatile int*)NULL) = 0;
@@ -24,14 +41,14 @@ void Fatal(char const *file, int line, char const *function, char const *message
void Error(char const *file, int line, char const *function, char const *message)
{
sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s ERROR:\n %s\n",
fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n",
file, line, function, message);
*((volatile int*)NULL) = 0;
}
void Warning(char const *file, int line, char const *function, char const *message)
{
sLog->outError(LOG_FILTER_GENERAL, "\n%s:%i in %s WARNING:\n %s\n",
fprintf(stderr, "\n%s:%i in %s WARNING:\n %s\n",
file, line, function, message);
}