aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-10-28 13:03:50 +0100
committerSpp <spp@jorge.gr>2012-10-28 13:03:50 +0100
commit1925027aec2cb88ebaa10245395fbf07e6474729 (patch)
treefea7637c0f85e162cf0c6ae7176ca834f458c14e /src/server/worldserver
parent57f84c920b17e7a2d788626d7d745d36c0618c72 (diff)
Core/Logging: Add new log type for SOAP.
Closes #8201
Diffstat (limited to 'src/server/worldserver')
-rwxr-xr-xsrc/server/worldserver/TCSoap/TCSoap.cpp18
-rw-r--r--src/server/worldserver/worldserver.conf.dist2
2 files changed, 11 insertions, 9 deletions
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index 3ce4d4f59cb..40b35df9aee 100755
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -32,18 +32,18 @@ void TCSoapRunnable::run()
soap.send_timeout = 5;
if (!soap_valid_socket(soap_bind(&soap, m_host.c_str(), m_port, 100)))
{
- sLog->outError(LOG_FILTER_WORLDSERVER, "TCSoap: couldn't bind to %s:%d", m_host.c_str(), m_port);
+ sLog->outError(LOG_FILTER_SOAP, "Couldn't bind to %s:%d", m_host.c_str(), m_port);
exit(-1);
}
- sLog->outInfo(LOG_FILTER_WORLDSERVER, "TCSoap: bound to http://%s:%d", m_host.c_str(), m_port);
+ sLog->outInfo(LOG_FILTER_SOAP, "Bound to http://%s:%d", m_host.c_str(), m_port);
while (!World::IsStopped())
{
if (!soap_valid_socket(soap_accept(&soap)))
continue; // ran into an accept timeout
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+ sLog->outDebug(LOG_FILTER_SOAP, "Accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
struct soap* thread_soap = soap_copy(&soap);// make a safe copy
ACE_Message_Block* mb = new ACE_Message_Block(sizeof(struct soap*));
@@ -78,33 +78,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// security check
if (!soap->userid || !soap->passwd)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client didn't provide login information");
+ sLog->outDebug(LOG_FILTER_SOAP, "Client didn't provide login information");
return 401;
}
uint32 accountId = AccountMgr::GetId(soap->userid);
if (!accountId)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client used invalid username '%s'", soap->userid);
+ sLog->outDebug(LOG_FILTER_SOAP, "Client used invalid username '%s'", soap->userid);
return 401;
}
if (!AccountMgr::CheckPassword(accountId, soap->passwd))
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: invalid password for account '%s'", soap->userid);
+ sLog->outDebug(LOG_FILTER_SOAP, "Invalid password for account '%s'", soap->userid);
return 401;
}
if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: %s's gmlevel is too low", soap->userid);
+ sLog->outDebug(LOG_FILTER_SOAP, "%s's gmlevel is too low", soap->userid);
return 403;
}
if (!command || !*command)
return soap_sender_fault(soap, "Command mustn't be empty", "The supplied command was an empty string");
- sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: got command '%s'", command);
+ sLog->outDebug(LOG_FILTER_SOAP, "Got command '%s'", command);
SOAPCommand connection;
// commands are executed in the world thread. We have to wait for them to be completed
@@ -119,7 +119,7 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
int acc = connection.pendingCommands.acquire();
if (acc)
{
- sLog->outError(LOG_FILTER_WORLDSERVER, "TCSoap: Error while acquiring lock, acc = %i, errno = %u", acc, errno);
+ sLog->outError(LOG_FILTER_SOAP, "Error while acquiring lock, acc = %i, errno = %u", acc, errno);
}
// alright, command finished
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 8f79cff8f46..4203b8a212d 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2786,6 +2786,8 @@ Appenders=Console Server GM DBErrors Char RA Warden Chat
# 39 - Battlefield
# 40 - Server Loading
# 41 - Opcodes (just id and name sent / received)
+# 42 - SOAP
+#
# LogLevel
# 0 - (Disabled)
# 1 - (Trace)