mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 16:02:46 +08:00
Removed 64-bit warning, and reduced more code duplication
This commit is contained in:
@@ -307,3 +307,14 @@ CApp::setupFileLogging()
|
||||
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.
|
||||
void setupFileLogging();
|
||||
|
||||
// If messages will be hidden (to improve performance), warn user.
|
||||
void loggingFilterWarning();
|
||||
|
||||
protected:
|
||||
virtual void parseArgs(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
|
||||
LOG((CLOG_INFO "%s Client on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
||||
|
||||
#ifdef WIN32
|
||||
#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())));
|
||||
}
|
||||
}
|
||||
loggingFilterWarning();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -138,18 +138,7 @@ CServerApp::parseArgs(int argc, const char* const* argv)
|
||||
// identify system
|
||||
LOG((CLOG_INFO "%s Server on %s %s", kAppVersion, ARCH->getOSName().c_str(), ARCH->getPlatformName().c_str()));
|
||||
|
||||
#ifdef WIN32
|
||||
#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())));
|
||||
}
|
||||
}
|
||||
loggingFilterWarning();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user