You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2005/06/27 17:33:33 UTC
cvs commit: logging-log4cxx/include/log4cxx dailyrollingfileappender.h
carnold 2005/06/27 08:33:33
Modified: . build.xml
examples stream.cpp
include/log4cxx dailyrollingfileappender.h
Log:
LOGCXX-36: Build tweaks
Revision Changes Path
1.76 +18 -44 logging-log4cxx/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/logging-log4cxx/build.xml,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- build.xml 14 Jun 2005 18:18:26 -0000 1.75
+++ build.xml 27 Jun 2005 15:33:33 -0000 1.76
@@ -212,7 +212,8 @@
http://ant-contrib.sourceforge.net.
</fail>
- <available classname="net.sf.antcontrib.cpptasks.ide.ProjectDef" property="cctask-project-available"/>
+ <available classname="net.sf.antcontrib.cpptasks.ide.ProjectDef"
+ property="cctask-project-available"/>
<fail unless="cctask-project-available">later version of cpptasks required
Required features not present in cpptasks releases prior to Feb 2005</fail>
@@ -282,13 +283,18 @@
</condition>
<property name="lib-suffix" value=""/>
- <available property="apr-available" file="${apr.lib.dir}/${lib.prefix}apr-1${lib-suffix}${lib.extension}"/>
- <available property="aprutil-available" file="${aprutil.lib.dir}/${lib.prefix}aprutil-1${lib-suffix}${lib.extension}"/>
- <available property="cppunit-available" file="${cppunit.lib.dir}/${lib.prefix}cppunit${lib-suffix}${lib.extension}"/>
+ <available property="apr-available"
+ file="${apr.lib.dir}/${lib.prefix}apr-1${lib-suffix}${lib.extension}"/>
+ <available property="aprutil-available"
+ file="${aprutil.lib.dir}/${lib.prefix}aprutil-1${lib-suffix}${lib.extension}"/>
+ <available property="cppunit-available"
+ file="${cppunit.lib.dir}/${lib.prefix}cppunit${lib-suffix}${lib.extension}"/>
<available property="apr-src-available" file="${lib.dir}/apr-${apr.version}.tar.gz"/>
- <available property="aprutil-src-available" file="${lib.dir}/apr-util-${aprutil.version}.tar.gz"/>
- <available property="cppunit-src-available" file="${lib.dir}/cppunit-${cppunit.version}.tar.gz"/>
+ <available property="aprutil-src-available"
+ file="${lib.dir}/apr-util-${aprutil.version}.tar.gz"/>
+ <available property="cppunit-src-available"
+ file="${lib.dir}/cppunit-${cppunit.version}.tar.gz"/>
<available property="apr-src-expanded" file="${lib.dir}/apr-${apr.version}"/>
<available property="aprutil-src-expanded" file="${lib.dir}/apr-util-${aprutil.version}"/>
@@ -647,12 +653,6 @@
<defineset define="LOG4CXX_STATIC" if="is-static"/>
<defineset define="APR_DECLARE_STATIC" if="apr-static"/>
<defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<compilerarg value="${pic-option}" if="pic-option"/>
@@ -748,12 +748,6 @@
<includepath path="${apr.include.dir}"/>
<compilerarg value="${pic-option}" if="pic-option"/>
<defineset define="LOG4CXX_STATIC" if="is-static"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
&libsets;
<project outfile="${project.dir}/shortsocketserver" type="${project.type}" if="project.if"/>
@@ -786,12 +780,6 @@
<defineset define="APR_DECLARE_STATIC" if="apr-static"/>
<defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
<defineset define="WIN32" if="is-windows"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<compilerarg value="${pic-option}" if="pic-option"/>
<libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
@@ -829,12 +817,6 @@
<defineset define="APR_DECLARE_STATIC" if="apr-static"/>
<defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
<defineset define="WIN32" if="is-windows"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<compilerarg value="${pic-option}" if="pic-option"/>
<libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
@@ -843,7 +825,9 @@
<libset libs="dl" if="is-unix"/>
&libsets;
- <project outfile="${project.dir}/log4cxx-defaultinit-test" type="${project.type}" if="project.if"/>
+ <project outfile="${project.dir}/log4cxx-defaultinit-test"
+ type="${project.type}"
+ if="project.if"/>
</cc>
</target>
@@ -872,12 +856,6 @@
<defineset define="APR_DECLARE_STATIC" if="apr-static"/>
<defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
<defineset define="WIN32" if="is-windows"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<compilerarg value="${pic-option}" if="pic-option"/>
<libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
@@ -916,12 +894,6 @@
<defineset define="APR_DECLARE_STATIC" if="apr-static"/>
<defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
<defineset define="WIN32" if="is-windows"/>
- <defineset if="is-utf8">
- <define name="LOG4CXX_LOGCHAR_IS_UTF8" value="1"/>
- </defineset>
- <defineset>
- <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
- </defineset>
<compilerarg value="${pic-option}" if="pic-option"/>
<libset libs="${cppunit.lib.name}${lib-suffix}" dir="${cppunit.lib.dir}" if="cppunit.lib.dir"/>
<libset libs="${cppunit.lib.name}${lib-suffix}" unless="cppunit.lib.dir"/>
@@ -936,7 +908,9 @@
<libset libs="cw32mt" if="is-bcc"/>
- <project outfile="${projects.dir}/log4cxx-standalone-test" type="${project.type}" if="project.if"/>
+ <project outfile="${projects.dir}/log4cxx-standalone-test"
+ type="${project.type}"
+ if="project.if"/>
</cc>
</target>
1.3 +8 -0 logging-log4cxx/examples/stream.cpp
Index: stream.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/examples/stream.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- stream.cpp 15 Dec 2004 08:10:37 -0000 1.2
+++ stream.cpp 27 Jun 2005 15:33:33 -0000 1.3
@@ -36,9 +36,17 @@
log4cxx::logstream logstream(rootLogger, Level::DEBUG);
logstream << "debug message " << 1 << LOG4CXX_ENDMSG;
logstream.setLevel(Level::INFO);
+#if LOG4CXX_HAS_WCHAR_T
logstream << L"info message" << LOG4CXX_ENDMSG;
+#else
+ logstream << "info message" << LOG4CXX_ENDMSG;
+#endif
logstream << Level::WARN << "warn message" << LOG4CXX_ENDMSG;
+#if LOG4CXX_HAS_WCHAR_T
logstream << Level::ERROR << L"error message" << LOG4CXX_ENDMSG;
+#else
+ logstream << Level::ERROR << "error message" << LOG4CXX_ENDMSG;
+#endif
logstream << Level::FATAL << "fatal message" << LOG4CXX_ENDMSG;
1.15 +4 -0 logging-log4cxx/include/log4cxx/dailyrollingfileappender.h
Index: dailyrollingfileappender.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/dailyrollingfileappender.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dailyrollingfileappender.h 1 Jun 2005 18:40:23 -0000 1.14
+++ dailyrollingfileappender.h 27 Jun 2005 15:33:33 -0000 1.15
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#ifndef _LOG4CXX_DAILYROLLINGFILEAPPENDER_H
+#define _LOG4CXX_DAILYROLLINGFILEAPPENDER_H
+
#include <log4cxx/appender.h>
#include <log4cxx/fileappender.h>
#include <log4cxx/spi/optionhandler.h>
@@ -275,3 +278,4 @@
}
+#endif