Add m_disable_sending_log to request to hide logging for server polling
This commit is contained in:
parent
bce888ec26
commit
3b2acf01eb
@ -819,7 +819,10 @@ void ServerLobby::checkIncomingConnectionRequests()
|
||||
}
|
||||
public:
|
||||
PollServerRequest(std::shared_ptr<ServerLobby> sl)
|
||||
: XMLRequest(true), m_server_lobby(sl) {}
|
||||
: XMLRequest(true), m_server_lobby(sl)
|
||||
{
|
||||
m_disable_sending_log = true;
|
||||
}
|
||||
}; // PollServerRequest
|
||||
// ========================================================================
|
||||
|
||||
|
@ -100,6 +100,7 @@ namespace Online
|
||||
m_cert_location =
|
||||
file_manager->getAsset("addons.supertuxkart.net.pem");
|
||||
}
|
||||
m_disable_sending_log = false;
|
||||
} // init
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@ -239,11 +240,11 @@ namespace Online
|
||||
m_parameters.erase(m_parameters.size()-1);
|
||||
}
|
||||
|
||||
if (m_parameters.size() == 0)
|
||||
if (m_parameters.size() == 0 && !m_disable_sending_log)
|
||||
{
|
||||
Log::info("HTTPRequest", "Downloading %s", m_url.c_str());
|
||||
}
|
||||
else if (Log::getLogLevel() <= Log::LL_INFO)
|
||||
else if (Log::getLogLevel() <= Log::LL_INFO && !m_disable_sending_log)
|
||||
{
|
||||
// Avoid printing the password or token, just replace them with *s
|
||||
std::string param = m_parameters;
|
||||
|
@ -73,6 +73,8 @@ namespace Online
|
||||
|
||||
static std::string m_cert_location;
|
||||
protected:
|
||||
bool m_disable_sending_log;
|
||||
|
||||
virtual void prepareOperation() OVERRIDE;
|
||||
virtual void operation() OVERRIDE;
|
||||
virtual void afterOperation() OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user