[mapguide-commits] r4914 - in sandbox/adsk/2.1/Web/src: CgiAgent
HttpHandler MapAgentCommon
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu May 20 16:12:37 EDT 2010
Author: brucedechant
Date: 2010-05-20 16:12:37 -0400 (Thu, 20 May 2010)
New Revision: 4914
Modified:
sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpUtil.cpp
sandbox/adsk/2.1/Web/src/MapAgentCommon/MapAgentCommon.cpp
Log:
Fix for trac ticket 1337 - Web tier logging
http://trac.osgeo.org/mapguide/ticket/1337
Notes:
- Fix log output on Linux
Modified: sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp 2010-05-19 11:46:12 UTC (rev 4913)
+++ sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp 2010-05-20 20:12:37 UTC (rev 4914)
@@ -533,16 +533,16 @@
MgDateTime currentTime;
STRING strCurrentTime = currentTime.ToXmlString(false);
- ACE_OS::fprintf(fp, ACE_TEXT("<%s> %d\t%s\t%s\t%s\t%s\n"), strCurrentTime.c_str(), requestId, client.c_str(), clientIp.c_str(), MgUtil::MultiByteToWideChar(requestMethod).c_str(), MgUtil::MultiByteToWideChar(url).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT("<%s> %d\t%s\t%s\t%s\t%s\n"), MG_WCHAR_TO_TCHAR(strCurrentTime), requestId, MG_WCHAR_TO_TCHAR(client), MG_WCHAR_TO_TCHAR(clientIp), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(requestMethod)), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(url)));
if (!postData.empty()) // NOXLATE
{
- ACE_OS::fprintf(fp, ACE_TEXT(" Postdata: %s\n"), MgUtil::MultiByteToWideChar(postData).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT(" Postdata: %s\n"), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(postData)));
}
if (!query.empty())
{
- ACE_OS::fprintf(fp, ACE_TEXT(" Query : %s\n"), MgUtil::MultiByteToWideChar(query).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT(" Query : %s\n"), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(query)));
}
ACE_OS::fclose(fp);
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpUtil.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpUtil.cpp 2010-05-19 11:46:12 UTC (rev 4913)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpUtil.cpp 2010-05-20 20:12:37 UTC (rev 4914)
@@ -51,8 +51,8 @@
STRING message = exception->GetMessage();
STRING stackTrace = exception->GetStackTrace();
- ACE_OS::fprintf(fp, ACE_TEXT("<%s>\n"), strCurrentTime.c_str());
- ACE_OS::fprintf(fp, ACE_TEXT(" Error: %s\n"), message.c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT("<%s>\n"), MG_WCHAR_TO_TCHAR(strCurrentTime));
+ ACE_OS::fprintf(fp, ACE_TEXT(" Error: %s\n"), MG_WCHAR_TO_TCHAR(message));
// Add the stack trace
// Do not log empty stack traces
@@ -78,7 +78,7 @@
entry += L"\n " + trace + L"\n";
}
- ACE_OS::fprintf(fp, ACE_TEXT("%s"), entry.c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT("%s"), MG_WCHAR_TO_TCHAR(entry));
}
ACE_OS::fclose(fp);
Modified: sandbox/adsk/2.1/Web/src/MapAgentCommon/MapAgentCommon.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/MapAgentCommon/MapAgentCommon.cpp 2010-05-19 11:46:12 UTC (rev 4913)
+++ sandbox/adsk/2.1/Web/src/MapAgentCommon/MapAgentCommon.cpp 2010-05-20 20:12:37 UTC (rev 4914)
@@ -292,16 +292,16 @@
MgDateTime currentTime;
STRING strCurrentTime = currentTime.ToXmlString(false);
- ACE_OS::fprintf(fp, ACE_TEXT("<%s> %d\t%s\t%s\t%s\t%s\n"), strCurrentTime.c_str(), requestId, client.c_str(), clientIp.c_str(), MgUtil::MultiByteToWideChar(requestMethod).c_str(), MgUtil::MultiByteToWideChar(url).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT("<%s> %d\t%s\t%s\t%s\t%s\n"), MG_WCHAR_TO_TCHAR(strCurrentTime), requestId, MG_WCHAR_TO_TCHAR(client), MG_WCHAR_TO_TCHAR(clientIp), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(requestMethod)), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(url)));
if (!postData.empty()) // NOXLATE
{
- ACE_OS::fprintf(fp, ACE_TEXT(" Postdata: %s\n"), MgUtil::MultiByteToWideChar(postData).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT(" Postdata: %s\n"), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(postData)));
}
if (!query.empty())
{
- ACE_OS::fprintf(fp, ACE_TEXT(" Query : %s\n"), MgUtil::MultiByteToWideChar(query).c_str());
+ ACE_OS::fprintf(fp, ACE_TEXT(" Query : %s\n"), MG_WCHAR_TO_TCHAR(MgUtil::MultiByteToWideChar(query)));
}
ACE_OS::fclose(fp);
More information about the mapguide-commits
mailing list