You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by ms...@apache.org on 2019/05/27 07:39:36 UTC

[plc4x] branch develop updated: BugFix Logger

This is an automated email from the ASF dual-hosted git repository.

msommer pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new da46956  BugFix Logger
da46956 is described below

commit da46956c5750c8631428123cc1258687b79977ca
Author: Markus Sommer <ms...@apache.org>
AuthorDate: Mon May 27 09:39:07 2019 +0200

    BugFix Logger
---
 .../src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp     | 6 +++---
 .../logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/ExLog.cpp | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp b/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp
index 57c99e5..09c8e88 100644
--- a/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp
+++ b/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp
@@ -33,9 +33,9 @@ void TracerW(const wchar_t* formatStr, ...)
 	static wchar_t arcBuffer[TRACE_BUFFERSIZE];
 	va_list args;
 	va_start(args, formatStr);
-	_vstprintf_s(arcBuffer, TRACE_BUFFERSIZE, formatStr, args);
+    swprintf_s(arcBuffer, TRACE_BUFFERSIZE, formatStr, args);
 	va_end(args);
-	::OutputDebugString(buffer);
+	::OutputDebugStringW(arcBuffer);
 }
 
 
@@ -46,7 +46,7 @@ void Tracer(const char* formatStr, ...)
 	va_start(args, formatStr);
 	vsprintf_s(arcBuffer, TRACE_BUFFERSIZE, formatStr, args);
 	va_end(args);
-	::OutputDebugStringA(buffer);
+	::OutputDebugStringA(arcBuffer);
 }
 
 #endif
diff --git a/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/ExLog.cpp b/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/ExLog.cpp
index 455d907..6dae0f6 100644
--- a/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/ExLog.cpp
+++ b/plc4cpp/utils/logger/src/main/cpp/org/apache/plc4x/cpp/utils/logger/ExLog.cpp
@@ -19,7 +19,7 @@ under the License.
 
 #include <boost/exception/all.hpp>
 #include <exception>
-#include <boost/lexical_cast.hpp>"
+#include <boost/lexical_cast.hpp>
 #include <typeinfo>
 #include "ErrorInfoException.h"