You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2020/12/29 16:13:31 UTC

[logging-log4cxx] branch master updated: Fix build on Windows with wchar (#47)

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

rmiddleton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


The following commit(s) were added to refs/heads/master by this push:
     new f7bc0fe  Fix build on Windows with wchar (#47)
f7bc0fe is described below

commit f7bc0fe709daf7dc9a843084e2712d6c3eca30a7
Author: Robert Middleton <rm...@users.noreply.github.com>
AuthorDate: Tue Dec 29 11:13:24 2020 -0500

    Fix build on Windows with wchar (#47)
---
 src/main/cpp/syslogappender.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/cpp/syslogappender.cpp b/src/main/cpp/syslogappender.cpp
index 65a17fd..18e6478 100644
--- a/src/main/cpp/syslogappender.cpp
+++ b/src/main/cpp/syslogappender.cpp
@@ -337,7 +337,8 @@ void SyslogAppender::append(const spi::LoggingEventPtr& event, Pool& p)
 			 it++, current++ ){
 			char buf[12];
 			apr_snprintf( buf, sizeof(buf), "(%d/%d)", current, packets.size() );
-			it->append( buf );
+			LOG4CXX_DECODE_CHAR(str, buf);
+			it->append( str );
 		}
 	}else{
 		packets.push_back( msg );