[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 <vladimir@getmangos.com>
This commit is contained in:
Vinolentus 2011-06-05 17:35:40 +04:00 committed by VladimirMangos
parent 0af77807c1
commit b68a88573f
4 changed files with 15 additions and 41 deletions

View file

@ -174,20 +174,19 @@ extern int main(int argc, char **argv)
#endif #endif
sLog.outString( "%s [world-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) ); sLog.outString( "%s [world-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );
sLog.outString( "<Ctrl-C> to stop.\n\n" ); sLog.outString( "<Ctrl-C> to stop." );
sLog.outString("\n\n"
sLog.outTitle( "MM MM MM MM MMMMM MMMM MMMMM"); "MM MM MM MM MMMMM MMMM MMMMM\n"
sLog.outTitle( "MM MM MM MM MMM MMM MM MM MMM MMM"); "MM MM MM MM MMM MMM MM MM MMM MMM\n"
sLog.outTitle( "MMM MMM MMM MM MMM MMM MM MM MMM"); "MMM MMM MMM MM MMM MMM MM MM MMM\n"
sLog.outTitle( "MM M MM MMMM MM MMM MM MM MMM"); "MM M MM MMMM MM MMM MM MM MMM\n"
sLog.outTitle( "MM M MM MMMMM MM MMMM MMM MM MM MMM"); "MM M MM MMMMM MM MMMM MMM MM MM MMM\n"
sLog.outTitle( "MM M MM M MMM MM MMM MMMMMMM MM MM MMM"); "MM M MM M MMM MM MMM MMMMMMM MM MM MMM\n"
sLog.outTitle( "MM MM MMM MM MM MM MMM MM MM MMM"); "MM MM MMM MM MM MM MMM MM MM MMM\n"
sLog.outTitle( "MM MM MMMMMMM MM MM MMM MMM MM MM MMM MMM"); "MM MM MMMMMMM MM MM MMM MMM MM MM MMM MMM\n"
sLog.outTitle( "MM MM MM MMM MM MM MMMMMM MMMM MMMMM"); "MM MM MM MMM MM MM MMMMMM MMMM MMMMM\n"
sLog.outTitle( " MM MMM http://getmangos.com"); " MM MMM http://getmangos.com\n"
sLog.outTitle( " MMMMMM\n\n"); " MMMMMM\n\n");
sLog.outString("Using configuration file %s.", cfg_file); sLog.outString("Using configuration file %s.", cfg_file);
DETAIL_LOG("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); DETAIL_LOG("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));

View file

@ -346,31 +346,6 @@ std::string Log::GetTimestampStr()
return std::string(buf); 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() void Log::outString()
{ {
if (m_includeTime) if (m_includeTime)

View file

@ -118,7 +118,7 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
public: public:
void Initialize(); void Initialize();
void InitColors(const std::string& init_str); void InitColors(const std::string& init_str);
void outTitle( const char * str);
void outCommand( uint32 account, const char * str, ...) ATTR_PRINTF(3,4); void outCommand( uint32 account, const char * str, ...) ATTR_PRINTF(3,4);
void outString(); // any log level void outString(); // any log level
// any log level // any log level

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11602" #define REVISION_NR "11603"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__