From b68a88573ff75af077de803d5f548fcb9afed74a Mon Sep 17 00:00:00 2001 From: Vinolentus Date: Sun, 5 Jun 2011 17:35:40 +0400 Subject: [PATCH] [11603] Drop sLog.outTitle. Used hardcoded color use for title not compatible in all cases with selected in config console colors for normal output and with custom background can be not readbale. Signed-off-by: VladimirMangos --- src/mangosd/Main.cpp | 27 +++++++++++++-------------- src/shared/Log.cpp | 25 ------------------------- src/shared/Log.h | 2 +- src/shared/revision_nr.h | 2 +- 4 files changed, 15 insertions(+), 41 deletions(-) diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 95d4ff8cf..62f7166ca 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -174,20 +174,19 @@ extern int main(int argc, char **argv) #endif sLog.outString( "%s [world-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) ); - sLog.outString( " to stop.\n\n" ); - - sLog.outTitle( "MM MM MM MM MMMMM MMMM MMMMM"); - sLog.outTitle( "MM MM MM MM MMM MMM MM MM MMM MMM"); - sLog.outTitle( "MMM MMM MMM MM MMM MMM MM MM MMM"); - sLog.outTitle( "MM M MM MMMM MM MMM MM MM MMM"); - sLog.outTitle( "MM M MM MMMMM MM MMMM MMM MM MM MMM"); - sLog.outTitle( "MM M MM M MMM MM MMM MMMMMMM MM MM MMM"); - sLog.outTitle( "MM MM MMM MM MM MM MMM MM MM MMM"); - sLog.outTitle( "MM MM MMMMMMM MM MM MMM MMM MM MM MMM MMM"); - sLog.outTitle( "MM MM MM MMM MM MM MMMMMM MMMM MMMMM"); - sLog.outTitle( " MM MMM http://getmangos.com"); - sLog.outTitle( " MMMMMM\n\n"); - + sLog.outString( " to stop." ); + sLog.outString("\n\n" + "MM MM MM MM MMMMM MMMM MMMMM\n" + "MM MM MM MM MMM MMM MM MM MMM MMM\n" + "MMM MMM MMM MM MMM MMM MM MM MMM\n" + "MM M MM MMMM MM MMM MM MM MMM\n" + "MM M MM MMMMM MM MMMM MMM MM MM MMM\n" + "MM M MM M MMM MM MMM MMMMMMM MM MM MMM\n" + "MM MM MMM MM MM MM MMM MM MM MMM\n" + "MM MM MMMMMMM MM MM MMM MMM MM MM MMM MMM\n" + "MM MM MM MMM MM MM MMMMMM MMMM MMMMM\n" + " MM MMM http://getmangos.com\n" + " MMMMMM\n\n"); sLog.outString("Using configuration file %s.", cfg_file); DETAIL_LOG("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index a13680c17..f99a4ba6e 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -346,31 +346,6 @@ std::string Log::GetTimestampStr() return std::string(buf); } -void Log::outTitle( const char * str) -{ - if (!str) - return; - - if (m_colored) - SetColor(true,WHITE); - - // not expected utf8 and then send as-is - printf("%s", str); - - if (m_colored) - ResetColor(true); - - printf("\n"); - if (logfile) - { - fprintf(logfile, "%s", str); - fprintf(logfile, "\n" ); - fflush(logfile); - } - - fflush(stdout); -} - void Log::outString() { if (m_includeTime) diff --git a/src/shared/Log.h b/src/shared/Log.h index ad003a66d..1e869923e 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -118,7 +118,7 @@ class Log : public MaNGOS::Singleton