Removed 64-bit warning, and reduced more code duplication
This commit is contained in:
parent
028142bee9
commit
a19e800b99
|
@ -307,3 +307,14 @@ CApp::setupFileLogging()
|
||||||
LOG((CLOG_DEBUG1 "logging to file (%s) enabled", argsBase().m_logFile));
|
LOG((CLOG_DEBUG1 "logging to file (%s) enabled", argsBase().m_logFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CApp::loggingFilterWarning()
|
||||||
|
{
|
||||||
|
if (CLOG->getFilter() > CLOG->getConsoleMaxLevel()) {
|
||||||
|
if (argsBase().m_logFile == NULL) {
|
||||||
|
LOG((CLOG_WARN "log messages above %s are NOT sent to console (use file logging)",
|
||||||
|
CLOG->getFilterName(CLOG->getConsoleMaxLevel())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -94,6 +94,9 @@ public:
|
||||||
// If --log was specified in args, then add a file logger.
|
// If --log was specified in args, then add a file logger.
|
||||||
void setupFileLogging();
|
void setupFileLogging();
|
||||||
|
|
||||||
|
// If messages will be hidden (to improve performance), warn user.
|
||||||
|
void loggingFilterWarning();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void parseArgs(int argc, const char* const* argv, int &i);
|
virtual void parseArgs(int argc, const char* const* argv, int &i);
|
||||||
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
||||||
|
|
|
@ -146,18 +146,7 @@ CClientApp::parseArgs(int argc, const char* const* argv)
|
||||||
// identify system
|
// identify system
|
||||||
LOG((CLOG_INFO "%s Client on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
LOG((CLOG_INFO "%s Client on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
||||||
|
|
||||||
#ifdef WIN32
|
loggingFilterWarning();
|
||||||
#ifdef _AMD64_
|
|
||||||
LOG((CLOG_WARN "This is an experimental x64 build of %s. Use it at your own risk.", kApplication));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CLOG->getFilter() > CLOG->getConsoleMaxLevel()) {
|
|
||||||
if (args().m_logFile == NULL) {
|
|
||||||
LOG((CLOG_WARN "log messages above %s are NOT sent to console (use file logging)",
|
|
||||||
CLOG->getFilterName(CLOG->getConsoleMaxLevel())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -138,18 +138,7 @@ CServerApp::parseArgs(int argc, const char* const* argv)
|
||||||
// identify system
|
// identify system
|
||||||
LOG((CLOG_INFO "%s Server on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
LOG((CLOG_INFO "%s Server on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
||||||
|
|
||||||
#ifdef WIN32
|
loggingFilterWarning();
|
||||||
#ifdef _AMD64_
|
|
||||||
LOG((CLOG_WARN "This is an experimental x64 build of %s. Use it at your own risk.", kApplication));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CLOG->getFilter() > CLOG->getConsoleMaxLevel()) {
|
|
||||||
if (args().m_logFile == NULL) {
|
|
||||||
LOG((CLOG_WARN "log messages above %s are NOT sent to console (use file logging)",
|
|
||||||
CLOG->getFilterName(CLOG->getConsoleMaxLevel())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue