Permalink
Browse files

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

… compile)


Closes #9501
  • Loading branch information...
1 parent d03da13 commit 3c6c8c11178108482ae5f9848ce402292e7367ce @Spp- Spp- committed Mar 26, 2013
@@ -83,6 +83,10 @@ add_library(collision STATIC
${collision_STAT_PCH_SRC}
)
+target_link_libraries(collision
+ shared
+)
+
# Generate precompiled header
if (USE_COREPCH)
add_cxx_pch(collision ${collision_STAT_PCH_HDR} ${collision_STAT_PCH_SRC})
@@ -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,22 +33,22 @@ 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;
}
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);
}
@@ -1,3 +1,21 @@
+/*
+ * 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 "ByteBuffer.h"
#include "Log.h"

11 comments on commit 3c6c8c1

Contributor

Spp- replied Mar 26, 2013

WPAssert wasn't using logging system
WPError and WPWarnings are unused
WPFatal was only used when connecting to DB

So makes sense to me to remove Logging system from this file... also probably now makes sense to move function back to .h to remove the need to link shared to collision

Agreed, and +1 on adding the licenses and copyright holders.

Contributor

jasperrietrae replied Mar 27, 2013

But why mangos copyright? :)

simple TrinityCore is derived from Massive Network Game Object Server

Contributor

jasperrietrae replied Mar 27, 2013

simple TrinityCore is derived from Massive Network Game Object Server

... You don't say? That doesn't mean files created newly solely for and by TrinityCore need copyright to mangos. >_>

but is derived from MaNGOS, he have his credits you have tyu understand it, and althought have a base of MaNGOS, for this reason put the copyright of MaNGOS you understand this?

@rsa @boxa @mns have contributed alot in this time to TrinityCore

Owner

Aokromes replied Mar 27, 2013

We only add Mangos credits on files that comes from Mangos, on own Trinitycore files or full rewriten files there is no need of add Mangos (C) or can be removed.

Contributor

jasperrietrae replied Mar 27, 2013

@Dokman please...

hahaha nice catch @discover! I bet there are bunch of files in tc with wrong copyrights...

Contributor

Spp- replied Mar 27, 2013

it was a copy and paste :) in fact no need to be there.

Please sign in to comment.