You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(10) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(17) |
Feb
(11) |
Mar
(2) |
Apr
(6) |
May
(17) |
Jun
(17) |
Jul
(4) |
Aug
(19) |
Sep
(21) |
Oct
(17) |
Nov
(6) |
Dec
(6) |
2003 |
Jan
(6) |
Feb
(6) |
Mar
(14) |
Apr
(16) |
May
(9) |
Jun
|
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2004 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(8) |
Oct
(6) |
Nov
(4) |
Dec
(6) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
|
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(6) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
(7) |
Apr
(3) |
May
|
Jun
(4) |
Jul
(5) |
Aug
(35) |
Sep
(13) |
Oct
(3) |
Nov
|
Dec
(2) |
2008 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(5) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
(1) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
(6) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
(3) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
From: Drew D. <dau...@st...> - 2003-05-07 16:13:14
|
Hi I have successfully compiled log4cpp release 0.3.4b with MS Visual Studio 6.0 and get the following linker errors when I try to include the library in my project: Linking... msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in apidemoDlg.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class basic_ string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in apidemoDlg.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char,s truct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in libcp mtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::logic_error::logic_error(class logic_error::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$ch ar_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::logic_error::logic_error(class logic_error::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q BEPBDXZ) already defined in libcpmtd.lib(string.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __vsnprintf already defined in libcmtd.lib(vsnprint.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtol already defined in libcmtd.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __close already defined in libcmtd.lib(close.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __write already defined in libcmtd.lib(write.obj) msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_str ing@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in apidemoDlg.obj; second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class basi c_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in apidemoDlg.obj; second definition i gnored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char ,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in lib cpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::logic_error::logic_error(class logic_error::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::logic_error::logic_error(class logic_error::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@ @QBEPBDXZ) already defined in libcpmtd.lib(string.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __vsnprintf already defined in libcmtd.lib(vsnprint.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: _strtol already defined in libcmtd.lib(strtol.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: _sprintf already defined in libcmtd.lib(sprintf.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __close already defined in libcmtd.lib(close.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __write already defined in libcmtd.lib(write.obj); second definition ignored Creating library Debug/apidemo.lib and object Debug/apidemo.exp LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library Debug/apidemo.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. apidemo.exe - 13 error(s), 13 warning(s) Am I missing something? Trying to exclude any of the libraries identified as containing duplicate symbols (notably the MSVCRTD library) only results in unresolved symbol errors. -drew |
From: Drew D. <dau...@um...> - 2003-05-07 16:07:06
|
Hi I have successfully compiled log4cpp release 0.3.4b with MS Visual Studio 6.0 and get the following linker errors when I try to include the library in my project: Linking... msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in apidemoDlg.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class basic_ string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in apidemoDlg.obj msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char,s truct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in libcp mtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::logic_error::logic_error(class logic_error::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$ch ar_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::logic_error::logic_error(class logic_error::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z) already defined in libcpmtd.lib(string.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Q BEPBDXZ) already defined in libcpmtd.lib(string.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __vsnprintf already defined in libcmtd.lib(vsnprint.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtol already defined in libcmtd.lib(strtol.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __close already defined in libcmtd.lib(close.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: __write already defined in libcmtd.lib(write.obj) msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_str ing@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in apidemoDlg.obj; second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class basi c_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z) already defined in apidemoDlg.obj; second definition i gnored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class basic_string<char ,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in lib cpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::logic_error::logic_error(class logic_error::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$ char_traits@D@std@@V?$allocator@D@2@@1@@Z) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: __thiscall std::logic_error::logic_error(class logic_error::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z) already defined in libcpmtd.lib(string.obj); second definition ignored msvcprtd.lib(MSVCP60D.dll) : warning LNK4006: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@ @QBEPBDXZ) already defined in libcpmtd.lib(string.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __vsnprintf already defined in libcmtd.lib(vsnprint.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: _strtol already defined in libcmtd.lib(strtol.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: _sprintf already defined in libcmtd.lib(sprintf.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __close already defined in libcmtd.lib(close.obj); second definition ignored MSVCRTD.lib(MSVCRTD.dll) : warning LNK4006: __write already defined in libcmtd.lib(write.obj); second definition ignored Creating library Debug/apidemo.lib and object Debug/apidemo.exp LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library Debug/apidemo.exe : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. apidemo.exe - 13 error(s), 13 warning(s) Am I missing something? Trying to exclude any of the libraries identified as containing duplicate symbols (notably the MSVCRTD library) only results in unresolved symbol errors. -drew |
From: Brian J. <cb...@gn...> - 2003-05-07 02:01:47
|
"Beresnev, Greg" <GRE...@ca...> writes: > hi everyone, > > I was wondering if anyone has encountered the following compilation > problem, and if so, what would be your proposed solution. I'm > starting to think it might have something to do with the > configuration on my machine, but the strange thing is that the error > goes away from time to time. (This machine is running Windows 2000, > as far as I recall) > /bin/bash /cygdrive/c/95/obj/win95/log4cpp/log4cpp/config/missing --run automake-1.6 --gnu Makefile > Makefile.am:1: DOC does not appear in AM_CONDITIONAL > gmake[3]: *** [Makefile.in] Error 1 > gmake[2]: *** [c:/95/obj/win95/log4cpp/.configured] Error 2 > gmake[1]: *** [build] Error 1 > gmake: *** [all] Error 2 I have a patch for cygwin at work to fix this and an install problem but I haven't been able to get approval to submit it back yet. Brian -- Brian Jones <cb...@gn...> |
From: Beresnev, G. <GRE...@ca...> - 2003-05-06 23:07:50
|
hi everyone, I was wondering if anyone has encountered the following compilation = problem, and if so, what would be your proposed solution. I'm starting to think it might = have something to do with the configuration on my machine, but the strange thing is that = the error goes away from time to time. (This machine is running Windows 2000, as far as = I recall) Last 100 lines of the output: checking whether ln -s works... yes checking how to recognise dependant libraries... file_magic file format = pei*-i386(.*architecture: i386)? checking command to parse /usr/bin/nm -B output... failed checking how to run the C preprocessor... c:/95/sso/mk/gcc2cl2 -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... no checking for inttypes.h... no checking for stdint.h... no checking for unistd.h... no checking dlfcn.h usability... no checking dlfcn.h presence... no checking for dlfcn.h... no checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for c:/95/sso/mk/gcc2cl2 option to produce PIC... -DDLL_EXPORT checking if c:/95/sso/mk/gcc2cl2 PIC flag -DDLL_EXPORT works... yes checking if c:/95/sso/mk/gcc2cl2 static flag works... yes checking if c:/95/sso/mk/gcc2cl2 supports -c -o file.o... yes checking if c:/95/sso/mk/gcc2cl2 supports -c -o file.lo... yes checking whether the linker (link) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... Win32 ld.exe checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool checking for a BSD-compatible install... /usr/bin/install -c checking whether gmake --unix --no-print-directory sets ${MAKE}... = (cached) yes checking whether we are using the GNU C++ compiler... no checking whether c:/95/sso/mk/gcc2cl2 accepts -g... no checking dependency style of c:/95/sso/mk/gcc2cl2... none checking how to run the C++ preprocessor... c:/95/sso/mk/gcc2cl2 -E checking for unistd.h... (cached) no checking io.h usability... no checking io.h presence... yes checking for io.h... configure: WARNING: io.h: present but cannot be = compiled configure: WARNING: io.h: check for missing prerequisite headers? configure: WARNING: io.h: proceeding with the preprocessor's result yes checking for int64_t... no checking whether the compiler implements namespaces... no checking whether the compiler has stringstream... no checking for working snprintf... no checking for syslog... no checking for gettimeofday... no checking for ftime... no checking for socket in -lsocket... no checking for gethostbyname in -lnsl... no creating log4cpp-config - generic 0.3.4b of log4cpp configure: creating ./config.status config.status: creating Makefile config.status: creating log4cpp.spec config.status: creating config/Makefile config.status: creating doc/Makefile config.status: creating doc/Doxyfile config.status: creating doc/html/Makefile config.status: creating src/Makefile config.status: creating include/Makefile config.status: creating include/log4cpp/Makefile config.status: creating include/log4cpp/threading/Makefile config.status: creating tests/Makefile config.status: creating debian/Makefile config.status: creating msvc6/Makefile config.status: creating msvc6/log4cpp/Makefile config.status: creating msvc6/log4cppDLL/Makefile config.status: creating msvc6/testCategory/Makefile config.status: creating msvc6/testDLL/Makefile config.status: creating msvc6/testMain/Makefile config.status: creating msvc6/testNDC/Makefile config.status: creating msvc6/testNTEventLog/Makefile config.status: creating msvc6/testPattern/Makefile config.status: creating bcb5/Makefile config.status: creating bcb5/log4cpp/Makefile config.status: creating bcb5/testCategory/Makefile config.status: creating bcb5/testConfig/Makefile config.status: creating bcb5/testFixedContextCategory/Makefile config.status: creating bcb5/testmain/Makefile config.status: creating bcb5/testNDC/Makefile config.status: creating bcb5/testPattern/Makefile config.status: creating openvms/Makefile config.status: creating include/config.h config.status: executing depfiles commands creating include/log4cpp/config.h - prefix LOG4CPP for include/config.h = defines /* automatically generated CVS/ bcb5/ config/ debian/ doc/ include/ m4/ = msvc6/ openvms/ src cd c:/95/obj/win95/log4cpp/log4cpp ; gmake --unix --no-print-directory = MAKEFLAGS=3D cd . && /bin/bash = /cygdrive/c/95/obj/win95/log4cpp/log4cpp/config/missing --run = aclocal-1.6=20 cd . && \ /bin/bash /cygdrive/c/95/obj/win95/log4cpp/log4cpp/config/missing = --run automake-1.6 --gnu Makefile Makefile.am:1: DOC does not appear in AM_CONDITIONAL gmake[3]: *** [Makefile.in] Error 1 gmake[2]: *** [c:/95/obj/win95/log4cpp/.configured] Error 2 gmake[1]: *** [build] Error 1 gmake: *** [all] Error 2 regards, Greg |
From: Brian J. <cb...@gn...> - 2003-05-05 18:00:35
|
We all know free software projects rarely work towards specific release dates and hold to them, however I'd like to get a feel for when the Log4cpp community, especially its maintainer, think a new non-beta release might generally be available? Are there plans to add the necessary classes to provide the Logger, Level, etc. naming in the near future? Thanks, Brian -- Brian Jones <cb...@gn...> |
From: Goh, B. <bet...@gl...> - 2003-05-05 10:06:48
|
Dear all, I notice that it is possible to have multiple appenders in the rootCategory when we specify them in the properties file. If I were to use only the rootCategory, is it possible for me to specify which of the many appenders listed in the rootCategory to be used? For example: log4j.rootCateogry=ERROR,CP,ABC And I want to use either the appenders CP or ABC. Is that possible? Many thanks. regards, Betty |
From: Szymanski J. <szy...@ya...> - 2003-05-02 14:12:46
|
Hi, Thanks to Dirk and his patched version I run now in VC7 without memory leaks at the end. That is really relief ... Then I introduced threads and leak is back ... After small trace I see that NDC allocates some data NDC& NDC::getNDC() { NDC* nDC = _nDC.get(); if (!nDC) { nDC = new NDC(); _nDC.reset(nDC); } return *nDC; } which are associated with local thread [ threading::ThreadLocalDataHolder<NDC> _nDC ] after particular thread ends, there is no association in _nDC and new NDC objects are created. Of course I can be wrong, I quickly looked in the code. To fix it for me I changed _clear() method in NDC: void NDC::_clear() { _stack.clear(); NDC* nDC = _nDC.release(); // added delete nDC; // added } and then at the end of the thread I call: log4cpp::NDC::clear(); to clear NDC associated with the thread, which is going to end. Discussion about 'is static leak a leak' is bit too academic for me, but I guess this leak is more dynamic then static, anyway for me all of them are bad, bad ;-) For the future implementation of Singletons I can recommend Loki (described by Alexandrescu in MC++D and available for free). Its PhoenixSingleton policy solves all problems of logging within static destructors. Before jumping to boost it is worth to maybe check his SmartPtr ... have a nice weekend, cheers, --jakub --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. |
From: D. L. <lo...@no...> - 2003-04-29 09:54:37
|
Hi Bastiaan, hi Jon >>>* in general cleaning up at program exit looks nice but is a waste of >>>resources (all remaining memory is going to be freed by the OS anyway). >>>OTOH it's nice if the application programmer can choose for herself, for >>>valgrinding,etc. . >> >>With all due respect -- I find log4cpp an invaluable tool for hunting down >>race conditions -- I must disagree with this statement. I've been fairly >>troubled troubled by log4cpp's memory leaks. Same holds true for me. I was teached by my parents to leave the toilet room after usage in a way I would like to see it when I want using it, even if a cleaner will regularyly show up and remove people's 'aehm' mess. And second, I do get a lot of troubles of my colleques if I introduce a libarary, that does not clean up correctly upon exit. You know, those little friendly annoyances day by day. Since my collegues started to tease me, I did the modifications. > Not to be nitpicking, but it does not per se . You're perfectly free to > leave that to a garbage collector for example. Using one would put an > end to so much waisting time with memory administrivia. Unfortunately it > is not an option of a library like log4cpp to force that upon the > application programmer. Yes, but there is no built in garbage collection in C++. One have to choose a different language if he/she wants to use a garbage collector. > One way in which the static leaks differ from the dynamic ones, is that > the latter grow over time, automically making themselves the center of > attention with a decent leak checker. It must not be a dynamic leak, that increases over time. There are static leaks that can be of interest, since something is not destructed correctly upon program exit. I really like the times of winNT where I can allocate memory, do whatever I want to do, open files, alloc semaphores, and whatever. shift-F5 and we have a clean state again. Without any reboot, day by day. (I'm not a win32 fanatic, I simply like the VisualStudio). I'm not sure, wether a stable execution of an environment is possible, if everybody is not cleaning up after himself. > One reason for my remark (other than to camouflage that I've been too > lazy to work on the problem) is that I feel that it's a minor problem Ok, I did it ;-), since I don't have the other problems you describe. > * make PropertyConfigurator extensible for third party Appenders, etc. Yes, have some interest in this, too. * a MDC (mapped diagnostic context) to store tracing level indentation * a Win32 control to configure the logging API * Appenders that can log events into a CListCtrl with column selection and all that stuff. I use the CEditLog from (http://www.codeproject.com/editctrl/editlog.asp) to log formatted messages to an application provided CEditCtrl right now. You mentioned COM need to shutdown earlier than program exit (DllDetach). I have no experience on this. I just found that someone else also had a simliar problem in a Win32 environment and suggested a solution with a more or less private AtExit queue. The article can be found here: http://www.codeproject.com/cpp/atinitexitinstance.asp > Yes, but also all references to log Categories need to be taken into > account, since the destructors of static objects may want to log as > well. So I guess all Category& occurences need to be replaced with > boost::shared_ptr's or similar. > That's not a trivial change..... but for 0.4.x it should be OK. I thought of that, too. But as you said, it is not a trivial change, and further it has some external visible changes. Therefor I decided to cleanup within the library, and stick to the policy to only use static Categories in static objects destructors. In this case the shutdown procedure will be delayed until the last destructor using the logging API is executed. >>I just got laid off. I've got a lot of work to do finding a new job, but I'd I which you lots of luck. >>be happy to work on this problem with someone else (Dirk?). I haven't used boost much up to now, I have looked into the sources to understand the concepts behind it. But I would like to help. Dirk |
From: Bastiaan B. <bas...@li...> - 2003-04-22 23:15:19
|
On Tue, 2003-04-22 at 21:58, Jon Stewart wrote: > Quoth Bastiaan: > > * in general cleaning up at program exit looks nice but is a waste of > > resources (all remaining memory is going to be freed by the OS anyway). > > OTOH it's nice if the application programmer can choose for herself, for > > valgrinding,etc. . > > With all due respect -- I find log4cpp an invaluable tool for hunting down > race conditions -- I must disagree with this statement. I've been fairly > troubled troubled by log4cpp's memory leaks. > double plus troubled, that's bad ;-) > Aesthetically/morally, C++ dictates that thou shalt delete thine memory. Not Not to be nitpicking, but it does not per se . You're perfectly free to leave that to a garbage collector for example. Using one would put an end to so much waisting time with memory administrivia. Unfortunately it is not an option of a library like log4cpp to force that upon the application programmer. > to do so is a bug. That's my brand of religion and I'm sticking to it. I would want to interfere with your religious beliefs :-) > But it's an ecumenical world, and I don't want to get into a religious war. > So, my *pragmatic* reason for being troubled by this sentiment (one I also > had to deal with from a former coworker) is that these static memory leaks > mask a user's own memory leaks. Visual Studio now tells you, somewhat One way in which the static leaks differ from the dynamic ones, is that the latter grow over time, automically making themselves the center of attention with a decent leak checker. > unhelpfully, about memory leaks at process shutdown. All kind of tools, like > Purify and Boundschecker, also do this job (in a much better way). When one > is trying to use these tools to enforce a strict policy of no memory leaks > in the repository, it's very difficult to separate one's own memory leaks > from third party memory leaks. That's a good policy to have, as C++ is a > systems language and systems typcially can't afford to have memory leaks; if > you can kill memory leaks from the start, you're going to have a better > chance of shipping. It would be extremely nice if log4cpp accomodated that > policy. > Yes, it would. It just hasn't been a priority (for me), since the services in which I use log4cpp are based on omniORB, which until recently couldn't cleanup properly at exit time. One reason for my remark (other than to camouflage that I've been too lazy to work on the problem) is that I feel that it's a minor problem compared to other things in log4cpp that may need attention, e.g.: * finish multithreading support. Currently it's half baked in half of the classes. * Define a clean separation between API, SPI and internal stuff. * Improve documentation * Improve build settings (e.g. proper multithreading flags for g++ 3.x) * make PropertyConfigurator extensible for third party Appenders, etc. * interoperability with log4j's SocketAppender (in both directions) > As far as implementation goes, when a number of logical singletons exist > with dependencies between them, I generally prefer wrapping them in a > "singleton context". That is, create one singleton class who's sole purpose > is to create, destroy, and provide access to a system's logical singletons. > One can then construct this singleton context and throw it into a static > boost::scoped_ptr and be assured that everything will be taken care of at > the appropriate time. > Yes, but also all references to log Categories need to be taken into account, since the destructors of static objects may want to log as well. So I guess all Category& occurences need to be replaced with boost::shared_ptr's or similar. That's not a trivial change..... but for 0.4.x it should be OK. > I just got laid off. I've got a lot of work to do finding a new job, but I'd Sorry to hear that. > be happy to work on this problem with someone else (Dirk?). > Great! Since you mentioned boost::scoped_ptr I guess you have experience with boost? I would like to use it in log4cpp but have no experience in integrating it in a project (autoconf detection, compiler settings, etc.) Regards, Bastiaan > My $.02. > > > Jon > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |
From: Jon S. <jst...@ho...> - 2003-04-22 19:58:36
|
Quoth Bastiaan: > * in general cleaning up at program exit looks nice but is a waste of > resources (all remaining memory is going to be freed by the OS anyway). > OTOH it's nice if the application programmer can choose for herself, for > valgrinding,etc. . With all due respect -- I find log4cpp an invaluable tool for hunting down race conditions -- I must disagree with this statement. I've been fairly troubled troubled by log4cpp's memory leaks. Aesthetically/morally, C++ dictates that thou shalt delete thine memory. Not to do so is a bug. That's my brand of religion and I'm sticking to it. But it's an ecumenical world, and I don't want to get into a religious war. So, my *pragmatic* reason for being troubled by this sentiment (one I also had to deal with from a former coworker) is that these static memory leaks mask a user's own memory leaks. Visual Studio now tells you, somewhat unhelpfully, about memory leaks at process shutdown. All kind of tools, like Purify and Boundschecker, also do this job (in a much better way). When one is trying to use these tools to enforce a strict policy of no memory leaks in the repository, it's very difficult to separate one's own memory leaks from third party memory leaks. That's a good policy to have, as C++ is a systems language and systems typcially can't afford to have memory leaks; if you can kill memory leaks from the start, you're going to have a better chance of shipping. It would be extremely nice if log4cpp accomodated that policy. As far as implementation goes, when a number of logical singletons exist with dependencies between them, I generally prefer wrapping them in a "singleton context". That is, create one singleton class who's sole purpose is to create, destroy, and provide access to a system's logical singletons. One can then construct this singleton context and throw it into a static boost::scoped_ptr and be assured that everything will be taken care of at the appropriate time. I just got laid off. I've got a lot of work to do finding a new job, but I'd be happy to work on this problem with someone else (Dirk?). My $.02. Jon |
From: Bastiaan B. <Bas...@li...> - 2003-04-22 16:43:43
|
Hi Dirk, Sorry for slow reply, I do appreciate your contribution, but my time has been consumed by a pending software release. I'll read and reply to your message more thoroughly in the coming days. Some short remarks: * I'm totally unhappy with ownsAppender stuff, and think of replacing it with boosts shared_ptr stuff. This may be applicable in other areas as well and simplify your work. * static variables in C++ shared libraries appear to be rather broken on some platforms. (One of the reasons for the odd locations of Log4cppCleanup). Maybe this will improve when we switch to libtool 1.5 * in general cleaning up at program exit looks nice but is a waste of resources (all remaining memory is going to be freed by the OS anyway). OTOH it's nice if the application programmer can choose for herself, for valgrinding,etc. . * to complicate things in some environments (COM?) cleanup needs to be done earlier, at DLL unload time rather than program exit. Not to discourage you ;-) I'll follow up on this later, Regards, Bastiaan Bakker On Wed, 2003-04-16 at 14:44, D. Luetjens wrote: > Hi, > > I did some work on the shutdown/memory leak issue. My problem was, that > after using log4cpp and the PropertyConfigurator I have lots of small > memory leaks during application shutdown. Calling Category::shutdown > will not help in this issue. I did some investigation and came up with > the following solution: > > 1.) The PropertyConfigurator allocates all declared appenders in the > configuration file, but will not transfer ownership to one of the > categories. This results in the appenders not beeing deleted during > shutdown, since the Categories have not set the _ownsAppender flag to true. > > There are two solutions to the problem: > a.) transfer the ownership of the appender to at least one Category or > introduce a dummy Category with the ownership of all instanciated appenders. > > b.) call Appender::_deleteAllAppenders somewhere during shutdown. > This yields the question to whom the AppenderMap belongs, and who is > responsible for deleting the appenders. one solution would be to do > the deletion via a static variable within the Appender class, but this > results in a circular dependancy with the HierarchyMaintainer. The > HierarchyMaintainer exist earlier than the AppenderMap, and therefor > will be deleted later. Within the destructor of the HierarchyMaintainer > the deleteAllCategories function is called where all Categories and the > contained appenders will be deleted. Deleting the AppenderMap before > this call will result in a crash during destruction. One could force the > creation of the AppenderMap before the creation of the > HierarchyMaintainer, but this is also not good programming practice. > > I solved the problem right now via a explicit call to deleteAllAppenders > during the shutdown of the HierarchyMaintainer. > > > > 2.) deletion of the AppenderMap itself > Don't know how to that correct, yet. I added a delete call for > Appender::_allAppenders into the Appender::_deleteAllAppenders () > function, since the map isn't used after a call to this function. > > This should be better done via a specifc AppenderMap class, that can > handle its contents and the map itself. And again, we must force this > AppenderMap to exist before the HierarchyMaintainer, since we otherwise > get shutdown oder dependancy. > > > 3.) deletion of the NDC > The ThreadLocalDataHolder should reset its content during destruction to > delete the stored data object > > 4.) delete the HierarchyMaintainer. > This is a curcial part, since the HierarchyMaintainer should delete all > Categories during destruction. But I use a lot of static references to > Categories within my application, that will be invalidated in a wrong > shutdown sequence. The problem is, that there is no guarantee in wich > order static variables are constructed. So simply adding a shutdown > class to the HierarchyMainainter will not solve the problem, since an > other static Category& variable could have been initialized before the > shutdown member was initialized. > > First I thought to introduce the a LogManager (like in Log4j) but this > doesn't solve the problem, only shifts it away from the > HierarchyMaintainer. The I realized, that I must add an implicit order > into the atexit sequence to install an atexit handler in the moment the > first static Category& is iniitialized. This can be done with an > auto_ptr in the HierarchyMaintainer like so: > > HierarchyMaintainer* HierarchyMaintainer::_defaultMaintainer = NULL; > > HierarchyMaintainer& HierarchyMaintainer::getDefaultMaintainer() { > > if (!_defaultMaintainer) { > static std::auto_ptr<HierarchyMaintainer> maintainer (new > HierarchyMaintainer()); > _defaultMaintainer = maintainer.get (); > } > > return *_defaultMaintainer; > } > > By stuffing the allocated HierarchyMaintainer into a static auto_ptr > within the getDefaultMaintainer function we will hook into the atexit > queue in the moment, the first time this function is called, and that is > exactly one element before the first static Category& that depends on > the HierarchMaintainer. > > With this the HierarchyMaintainer will be deleted during application > shutdown, and all resources are freed. > > On little problem still exists: What if after the destruction of the > HierarchyMaintainer someone tries to get a reference to a Category. This > again will fire up the HierarchyMaintainer resulting in the allocation > of objects. > > The solution to this is not to use local references to Categories, only > static references. > > A second solution would be to use the LogManager/LoggerRepository class > from log4j, that introduces a variable repository for Logger objects. > The default repository would be the HierarchyMaintainer. All calls to > getCategory/getLogger are redirected through the LogManager. After > shutdown one could return a static "do nothing" category from the > LogManager. Then, if you call the LogManager::getLogger("whatever") > after shutdown of the log4cpp library you get a valid logger, but this > logger will not do anything and all references to static Categories are > still valid until the HierarchyMaintainer is deleted. > > > ----- > > As a second solution I would like to say, that the Log4cppCleanup class > wasn't that bad at all. I think now, that it was was simply wrong > allocated. If you would do it with the auto_ptr method as described > above and make a call to the Log4cppCleanup::getInstance function from > all allocations of static variables it would have worked. > > static Log4cppCleanup::instance* = NULL; > > Log4cppCleanup::getInstance () > { > if (!instance) > { > // the auto_ptr will force the deletion of the Log4cppCleanup > // after all depending objects have been deleted > static std::auto_ptr <Log4cppCleanup> autoInstace (new Log4cppCleanup); > > instance = autoInstace.get (); > } > return instance; > } > > HierarchyMaintainer& HierarchyMaintainer::getDefaultMaintainer() > { > if (!_defaultMaintainer) > { > // force the Cleanup class into the atExit queue > Log4cppCleanup::getInstance (); > > // don't need the auto_ptr here, since all cleanup is done > // via Log4ccpCleanup > _defaultMaintainer = new HierarchyMaintainer(); > } > return *_defaultMaintainer; > } > > ---------- > > > I attach a patch to the CVS checkout from 14.04.2003 to implement all > that stuff, except the proper handling of local categories during > shutdown returned from LogManager::getLogger (). > > The patch includes also a change for the Appender::getAllAppenders to > return a vector<Appender*>* and an additional method for the > FileAppender to return its name. An last but not least I included a file > named dontdiff to use for building diffs, to exclude unwanted files in > the diff: > > > diff -Naur -X log4cpp/dontdiff ... > > Perhaps you can give me some feedback about the two proposed solutions. > > Thanks > Dirk > > > > ______________________________________________________________________ > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/dontdiff log4cpp/dontdiff > --- SourceForge/log4cpp/dontdiff 1970-01-01 01:00:00.000000000 +0100 > +++ log4cpp/dontdiff 2003-04-16 12:22:36.000000000 +0200 > @@ -0,0 +1,8 @@ > +*.ncb > +*.dsp > +*.dsw > +*.plg > +Debug > +Release > +CVS > +vssver.scc > \ No newline at end of file > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/Appender.hh log4cpp/include/log4cpp/Appender.hh > --- SourceForge/log4cpp/include/log4cpp/Appender.hh 2002-10-27 02:48:52.000000000 +0100 > +++ log4cpp/include/log4cpp/Appender.hh 2003-04-16 11:26:04.000000000 +0200 > @@ -14,6 +14,7 @@ > #include <string> > #include <map> > #include <set> > +#include <vector> > #include <stdarg.h> > #include <sys/types.h> > #include <sys/stat.h> > @@ -53,6 +54,15 @@ > **/ > static void closeAll(); > > + /** > + * Returns a vector of currently defined Appenders. > + * Note: this function does not pass ownership of the appenders in > + * the vector to the caller, only the ownership of the vector. > + * @since 0.3.1 > + * @returns The vector of active Appenders. > + **/ > + static std::vector<Appender*>* getAllAppenders(); > + > protected: > /** > * Constructor for Appender. Will only be used in getAppender() (and > @@ -130,6 +140,14 @@ > **/ > virtual Filter* getFilter() = 0; > > + > + /** > + * deletes all Appenders > + * @returns > + **/ > + static void deleteAllAppenders (); > + > + > private: > typedef std::map<std::string, Appender*> AppenderMap; > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/Category.hh log4cpp/include/log4cpp/Category.hh > --- SourceForge/log4cpp/include/log4cpp/Category.hh 2002-10-27 02:38:15.000000000 +0100 > +++ log4cpp/include/log4cpp/Category.hh 2003-04-15 12:16:11.000000000 +0200 > @@ -199,11 +199,13 @@ > virtual Appender* getAppender(const std::string& name) const; > > /** > - * Returns the set of Appenders currently attached to this Catogory. > + * Returns a vector of Appenders currently attached to this Catogory. > + * Note: this function does not pass ownership of the appenders in > + * the vector to the caller, only the ownership of the vector. > * @since 0.3.1 > - * @returns The set of attached Appenders. > + * @returns The vector of attached Appenders. > **/ > - virtual AppenderSet getAllAppenders() const; > + virtual std::vector<Appender*>* getAllAppenders() const; > > /** > * Removes all appenders for this Category. > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/FileAppender.hh log4cpp/include/log4cpp/FileAppender.hh > --- SourceForge/log4cpp/include/log4cpp/FileAppender.hh 2002-03-22 22:30:07.000000000 +0100 > +++ log4cpp/include/log4cpp/FileAppender.hh 2003-02-27 16:42:25.000000000 +0100 > @@ -41,6 +41,12 @@ > virtual ~FileAppender(); > > /** > + * Get the filename of this appender. > + * @returns the filename of the appender. > + **/ > + inline const std::string& getFileName() const { return _fileName; }; > + > + /** > Reopens the logfile. > This can be useful for logfiles that are rotated externally, > e.g. by logrotate. This method is a NOOP for FileAppenders that > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/FixedContextCategory.hh log4cpp/include/log4cpp/FixedContextCategory.hh > --- SourceForge/log4cpp/include/log4cpp/FixedContextCategory.hh 2002-07-03 23:55:52.000000000 +0200 > +++ log4cpp/include/log4cpp/FixedContextCategory.hh 2003-02-27 14:42:38.000000000 +0100 > @@ -104,7 +104,7 @@ > * @since 0.3.1 > * @returns The set of attached Appenders. > **/ > - virtual AppenderSet getAllAppenders() const; > + virtual std::vector<Appender*>* getAllAppenders() const; > > /** > * Removes all appenders set for this Category. Currently a Category > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/HierarchyMaintainer.hh log4cpp/include/log4cpp/HierarchyMaintainer.hh > --- SourceForge/log4cpp/include/log4cpp/HierarchyMaintainer.hh 2002-10-27 02:48:52.000000000 +0100 > +++ log4cpp/include/log4cpp/HierarchyMaintainer.hh 2003-04-15 12:08:21.000000000 +0200 > @@ -15,6 +15,7 @@ > #include <map> > #include <vector> > #include <log4cpp/Category.hh> > +#include <log4cpp/LoggerRepository.hh> > #include <log4cpp/threading/Threading.hh> > > namespace log4cpp { > @@ -24,8 +25,7 @@ > * for maintaining the hierarchy of Categories. Applications should > * not have to use this class directly. > **/ > - class HierarchyMaintainer { > - friend class Log4cppCleanup; > + class HierarchyMaintainer : public LoggerRepository { > > public: > typedef std::map<std::string, Category*> CategoryMap; > @@ -36,8 +36,28 @@ > virtual ~HierarchyMaintainer(); > virtual Category* getExistingInstance(const std::string& name); > virtual Category& getInstance(const std::string& name); > + > virtual std::vector<Category*>* getCurrentCategories() const; > + > + > + // interface for the LoggerRepository > + virtual Category& getRootLogger() { > + return getInstance (""); > + } > + virtual Category& getLogger(const std::string& name) { > + return getInstance (name); > + } > + virtual Category* exists(const std::string& name) { > + return getExistingInstance (name); > + } > + virtual std::vector<Category*>* getCurrentLoggers() const { > + return getCurrentCategories (); > + } > + > virtual void shutdown(); > + // end interface for the LoggerRepository > + > + > virtual void deleteAllCategories(); > > protected: > @@ -47,7 +67,7 @@ > mutable threading::Mutex _categoryMutex; > > private: > - static HierarchyMaintainer* _defaultMaintainer; > + static HierarchyMaintainer* _defaultMaintainer; > }; > } > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/LogManager.hh log4cpp/include/log4cpp/LogManager.hh > --- SourceForge/log4cpp/include/log4cpp/LogManager.hh 1970-01-01 01:00:00.000000000 +0100 > +++ log4cpp/include/log4cpp/LogManager.hh 2003-04-15 11:53:38.000000000 +0200 > @@ -0,0 +1,104 @@ > +/* > + * LogManager.hh > + * > + * See the COPYING file for the terms of usage and distribution. > + */ > + > +#ifndef _LOG4CPP_LOGMANAGER_HH > +#define _LOG4CPP_LOGMANAGER_HH > + > +#include <log4cpp/LoggerRepository.hh> > +#include <log4cpp/Category.hh> > + > + > +namespace log4cpp { > + > + /** > + * abstract base class to retrieve a LoggerRepository > + */ > + class RepositorySelector > + { > + public: > + virtual LoggerRepository& getLoggerRepository() = 0; > + }; > + > + /** > + * encapsulates and returns the default repository selector > + */ > + class DefaultRepositorySelector : public RepositorySelector > + { > + public: > + DefaultRepositorySelector (LoggerRepository& repository) > + : _loggerRepository (repository) > + { } > + > + virtual LoggerRepository& getLoggerRepository() > + { > + return _loggerRepository; > + } > + > + private: > + LoggerRepository& _loggerRepository; > + }; > + > + > + /** > + * Use the <code>LogManager</code> class to retreive {@link Logger} > + * instances or to operate on the current {@link LoggerRepository}. > + * > + * @author log4j: Ceki Gülcü > + **/ > + class LOG4CPP_EXPORT LogManager { > + public: > + /** > + Returns the underlying repository > + > + @returns the underlying repository > + */ > + static LoggerRepository& getLoggerRepository(); > + > + /** > + Retrieve the appropriate root logger. > + */ > + static Category& getRootLogger() { > + // Delegate the actual manufacturing of the logger to the logger repository. > + return getLoggerRepository().getRootLogger(); > + } > + > + /** > + Retrieve the appropriate {@link Logger} instance. > + */ > + static Category& getLogger(const std::string& name) { > + // Delegate the actual manufacturing of the logger to the logger repository. > + return getLoggerRepository().getLogger(name); > + } > + > + /** > + Check if the named logger exists in the hierarchy. If so return > + its reference, otherwise returns <code>null</code>. > + > + @param name The name of the logger to search for. > + */ > + static Category* exists(const std::string& name) { > + return getLoggerRepository().exists(name); > + } > + > + > + static std::vector<Category*>* getCurrentLoggers() { > + return getLoggerRepository().getCurrentLoggers(); > + } > + > + > + /** > + shutdown the logging API. After calling shutdown, one should not call any other > + function of this class. > + */ > + static void shutdown(); > + > + > + private: > + static RepositorySelector* _repositorySelector; > + }; > +} > + > +#endif // _LOG4CPP_LOGMANAGER_HH > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/LoggerRepository.hh log4cpp/include/log4cpp/LoggerRepository.hh > --- SourceForge/log4cpp/include/log4cpp/LoggerRepository.hh 1970-01-01 01:00:00.000000000 +0100 > +++ log4cpp/include/log4cpp/LoggerRepository.hh 2003-04-15 11:53:23.000000000 +0200 > @@ -0,0 +1,51 @@ > +/* > + * LogManager.hh > + * > + * See the COPYING file for the terms of usage and distribution. > + */ > + > +#ifndef _LOG4CPP_LOGGERREPOSITORY_HH > +#define _LOG4CPP_LOGGERREPOSITORY_HH > + > +#include <log4cpp/Category.hh> > + > + > +namespace log4cpp { > + > + /** > + * abstract base class for the LoggerRepository > + */ > + class LOG4CPP_EXPORT LoggerRepository > + { > + public: > + /** > + Retrieve the appropriate root logger. > + */ > + virtual Category& getRootLogger() = 0; > + > + /** > + Retrieve the appropriate {@link Logger} instance. > + > + @param name The name of the logger to search for. > + */ > + virtual Category& getLogger(const std::string& name) = 0; > + > + /** > + Check if the named logger exists in the hierarchy. If so return > + its reference, otherwise returns <code>null</code>. > + > + @param name The name of the logger to search for. > + */ > + virtual Category* exists(const std::string& name) = 0; > + > + > + virtual std::vector<Category*>* getCurrentLoggers() const = 0; > + > + /** > + * shutdown the Repository. > + */ > + virtual void shutdown() = 0; > + }; > +} > + > +#endif // _LOG4CPP_LOGGERREPOSITORY_HH > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/include/log4cpp/threading/MSThreads.hh log4cpp/include/log4cpp/threading/MSThreads.hh > --- SourceForge/log4cpp/include/log4cpp/threading/MSThreads.hh 2002-10-10 17:46:36.000000000 +0200 > +++ log4cpp/include/log4cpp/threading/MSThreads.hh 2003-04-15 16:23:47.000000000 +0200 > @@ -103,7 +103,7 @@ > inline ThreadLocalDataHolder() : > _key(TlsAlloc()) {}; > > - inline ~ThreadLocalDataHolder() { TlsFree(_key); }; > + inline ~ThreadLocalDataHolder() { reset (); TlsFree(_key); }; > > /** > * Obtains the Object held for the current thread. > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/src/Appender.cpp log4cpp/src/Appender.cpp > --- SourceForge/log4cpp/src/Appender.cpp 2002-10-27 02:48:52.000000000 +0100 > +++ log4cpp/src/Appender.cpp 2003-04-16 11:26:04.000000000 +0200 > @@ -11,13 +11,13 @@ > #include <log4cpp/Appender.hh> > > namespace log4cpp { > - Appender::AppenderMap* Appender::_allAppenders; > + Appender::AppenderMap* Appender::_allAppenders = NULL; > threading::Mutex Appender::_appenderMapMutex; > > /* assume _appenderMapMutex locked */ > Appender::AppenderMap& Appender::_getAllAppenders() { > if (!_allAppenders) > - _allAppenders = new Appender::AppenderMap(); > + _allAppenders = new Appender::AppenderMap(); > > return *_allAppenders; > } > @@ -59,14 +59,22 @@ > } > } > > - void Appender::_deleteAllAppenders() { > + void Appender::deleteAllAppenders() { > threading::ScopedLock lock(_appenderMapMutex); > + _deleteAllAppenders (); > + } > + > + void Appender::_deleteAllAppenders() { > AppenderMap& allAppenders = _getAllAppenders(); > for(AppenderMap::iterator i = allAppenders.begin(); i != allAppenders.end(); ) { > Appender *app = (*i).second; > i++; // increment iterator before delete or iterator will be invalid. > delete (app); > } > + > + // we need to delete the map also > + delete _allAppenders; > + _allAppenders = NULL; > } > > Appender::Appender(const std::string& name) : > @@ -77,4 +85,20 @@ > Appender::~Appender() { > _removeAppender(this); > } > + > + std::vector<Appender*>* Appender::getAllAppenders() { > + threading::ScopedLock lock(_appenderMapMutex); > + AppenderMap& allAppenders = _getAllAppenders(); > + > + std::vector<Appender*>* appenderVector = new std::vector<Appender*>; > + appenderVector->reserve(allAppenders.size()); > + > + for(AppenderMap::const_iterator i = allAppenders.begin(); i != allAppenders.end(); i++) { > + appenderVector->push_back((*i).second); > + } > + > + return appenderVector; > + } > + > + > } > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/src/Category.cpp log4cpp/src/Category.cpp > --- SourceForge/log4cpp/src/Category.cpp 2002-10-27 02:38:15.000000000 +0100 > +++ log4cpp/src/Category.cpp 2003-04-14 17:30:44.000000000 +0200 > @@ -14,7 +14,7 @@ > #endif > > #include <log4cpp/Category.hh> > -#include <log4cpp/HierarchyMaintainer.hh> > +#include <log4cpp/LogManager.hh> > #include <log4cpp/NDC.hh> > #include "StringUtil.hh" > > @@ -33,20 +33,19 @@ > } > > Category& Category::getInstance(const std::string& name) { > - return HierarchyMaintainer::getDefaultMaintainer().getInstance(name); > + return LogManager::getLogger(name); > } > > Category* Category::exists(const std::string& name) { > - return HierarchyMaintainer::getDefaultMaintainer().getExistingInstance(name); > + return LogManager::exists(name); > } > > std::vector<Category*>* Category::getCurrentCategories() { > - return HierarchyMaintainer::getDefaultMaintainer(). > - getCurrentCategories(); > + return LogManager::getCurrentLoggers(); > } > > void Category::shutdown() { > - HierarchyMaintainer::getDefaultMaintainer().shutdown(); > + LogManager::shutdown(); > } > > Category::Category(const std::string& name, Category* parent, Priority::Value priority) : > @@ -141,10 +140,19 @@ > } > } > > - AppenderSet Category::getAllAppenders() const { > - threading::ScopedLock lock(_appenderSetMutex); > + std::vector<Appender*>* Category::getAllAppenders() const { > { > - return _appender; > + std::vector<Appender*>* appender = new std::vector<Appender*>; > + appender->reserve(_appender.size()); > + > + threading::ScopedLock lock(_appenderSetMutex); > + { > + for(AppenderSet::const_iterator i = _appender.begin(); i != _appender.end(); i++) { > + appender->push_back(*i); > + } > + } > + > + return appender; > } > } > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/src/FixedContextCategory.cpp log4cpp/src/FixedContextCategory.cpp > --- SourceForge/log4cpp/src/FixedContextCategory.cpp 2002-10-26 20:30:55.000000000 +0200 > +++ log4cpp/src/FixedContextCategory.cpp 2003-02-27 14:42:48.000000000 +0100 > @@ -61,7 +61,7 @@ > return _delegate.getAppender(name); > } > > - AppenderSet FixedContextCategory::getAllAppenders() const { > + std::vector<Appender*>* FixedContextCategory::getAllAppenders() const { > return _delegate.getAllAppenders(); > } > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/src/HierarchyMaintainer.cpp log4cpp/src/HierarchyMaintainer.cpp > --- SourceForge/log4cpp/src/HierarchyMaintainer.cpp 2003-04-16 13:03:11.000000000 +0200 > +++ log4cpp/src/HierarchyMaintainer.cpp 2003-04-16 11:26:04.000000000 +0200 > @@ -22,10 +22,17 @@ > > namespace log4cpp { > > + HierarchyMaintainer* HierarchyMaintainer::_defaultMaintainer = NULL; > + > HierarchyMaintainer& HierarchyMaintainer::getDefaultMaintainer() { > - static HierarchyMaintainer defaultMaintainer; > > - return defaultMaintainer; > + if (!_defaultMaintainer) > + { > + static std::auto_ptr<HierarchyMaintainer> maintainer (new HierarchyMaintainer()); > + _defaultMaintainer = maintainer.get (); > + } > + > + return *_defaultMaintainer; > } > > HierarchyMaintainer::HierarchyMaintainer() { > @@ -34,6 +41,11 @@ > HierarchyMaintainer::~HierarchyMaintainer() { > shutdown(); > deleteAllCategories(); > + > + // also delete the appender map: This should be moved to a better place > + Appender::deleteAllAppenders(); > + > + _defaultMaintainer = NULL; > } > > Category* HierarchyMaintainer::getExistingInstance(const std::string& name) { > @@ -65,6 +77,7 @@ > if (NULL == result) { > if (name == "") { > result = new Category(name, NULL, Priority::INFO); > + result->addAppender(new FileAppender("_", ::dup(fileno(stderr)))); > } else { > std::string parentName; > size_t dotIndex = name.find_last_of('.'); > @@ -109,6 +122,7 @@ > for(CategoryMap::const_iterator i = _categoryMap.begin(); i != _categoryMap.end(); i++) { > delete ((*i).second); > } > + _categoryMap.clear(); > } > } > > diff -Naur -Xlog4cpp/dontdiff SourceForge/log4cpp/src/LogManager.cpp log4cpp/src/LogManager.cpp > --- SourceForge/log4cpp/src/LogManager.cpp 1970-01-01 01:00:00.000000000 +0100 > +++ log4cpp/src/LogManager.cpp 2003-04-16 11:53:49.000000000 +0200 > @@ -0,0 +1,38 @@ > +/* > + * LogManager.cpp > + * > + * See the COPYING file for the terms of usage and distribution. > + */ > + > +#include <log4cpp/LogManager.hh> > +#include <log4cpp/HierarchyMaintainer.hh> > + > +namespace log4cpp { > + > + RepositorySelector* LogManager::_repositorySelector = NULL; > + > + LoggerRepository& LogManager::getLoggerRepository() > + { > + if (!_repositorySelector) > + { > + // auto deletion of the _repositorySelector > + static std::auto_ptr<RepositorySelector> autoRepositorySelector (new DefaultRepositorySelector (HierarchyMaintainer::getDefaultMaintainer ())); > + > + _repositorySelector = autoRepositorySelector.get(); > + } > + > + return _repositorySelector->getLoggerRepository(); > + } > + > + void LogManager::shutdown() > + { > + if (_repositorySelector) > + { > + getLoggerRepository().shutdown(); > + > +// delete _repositorySelector; > +// _repositorySelector = NULL; > + } > + } > + > +} > \ No newline at end of file -- Bastiaan Bakker <Bas...@li...> LifeLine Networks bv |
From: D. L. <lo...@no...> - 2003-04-16 12:45:01
|
Hi, I did some work on the shutdown/memory leak issue. My problem was, that after using log4cpp and the PropertyConfigurator I have lots of small memory leaks during application shutdown. Calling Category::shutdown will not help in this issue. I did some investigation and came up with the following solution: 1.) The PropertyConfigurator allocates all declared appenders in the configuration file, but will not transfer ownership to one of the categories. This results in the appenders not beeing deleted during shutdown, since the Categories have not set the _ownsAppender flag to true. There are two solutions to the problem: a.) transfer the ownership of the appender to at least one Category or introduce a dummy Category with the ownership of all instanciated appenders. b.) call Appender::_deleteAllAppenders somewhere during shutdown. This yields the question to whom the AppenderMap belongs, and who is responsible for deleting the appenders. one solution would be to do the deletion via a static variable within the Appender class, but this results in a circular dependancy with the HierarchyMaintainer. The HierarchyMaintainer exist earlier than the AppenderMap, and therefor will be deleted later. Within the destructor of the HierarchyMaintainer the deleteAllCategories function is called where all Categories and the contained appenders will be deleted. Deleting the AppenderMap before this call will result in a crash during destruction. One could force the creation of the AppenderMap before the creation of the HierarchyMaintainer, but this is also not good programming practice. I solved the problem right now via a explicit call to deleteAllAppenders during the shutdown of the HierarchyMaintainer. 2.) deletion of the AppenderMap itself Don't know how to that correct, yet. I added a delete call for Appender::_allAppenders into the Appender::_deleteAllAppenders () function, since the map isn't used after a call to this function. This should be better done via a specifc AppenderMap class, that can handle its contents and the map itself. And again, we must force this AppenderMap to exist before the HierarchyMaintainer, since we otherwise get shutdown oder dependancy. 3.) deletion of the NDC The ThreadLocalDataHolder should reset its content during destruction to delete the stored data object 4.) delete the HierarchyMaintainer. This is a curcial part, since the HierarchyMaintainer should delete all Categories during destruction. But I use a lot of static references to Categories within my application, that will be invalidated in a wrong shutdown sequence. The problem is, that there is no guarantee in wich order static variables are constructed. So simply adding a shutdown class to the HierarchyMainainter will not solve the problem, since an other static Category& variable could have been initialized before the shutdown member was initialized. First I thought to introduce the a LogManager (like in Log4j) but this doesn't solve the problem, only shifts it away from the HierarchyMaintainer. The I realized, that I must add an implicit order into the atexit sequence to install an atexit handler in the moment the first static Category& is iniitialized. This can be done with an auto_ptr in the HierarchyMaintainer like so: HierarchyMaintainer* HierarchyMaintainer::_defaultMaintainer = NULL; HierarchyMaintainer& HierarchyMaintainer::getDefaultMaintainer() { if (!_defaultMaintainer) { static std::auto_ptr<HierarchyMaintainer> maintainer (new HierarchyMaintainer()); _defaultMaintainer = maintainer.get (); } return *_defaultMaintainer; } By stuffing the allocated HierarchyMaintainer into a static auto_ptr within the getDefaultMaintainer function we will hook into the atexit queue in the moment, the first time this function is called, and that is exactly one element before the first static Category& that depends on the HierarchMaintainer. With this the HierarchyMaintainer will be deleted during application shutdown, and all resources are freed. On little problem still exists: What if after the destruction of the HierarchyMaintainer someone tries to get a reference to a Category. This again will fire up the HierarchyMaintainer resulting in the allocation of objects. The solution to this is not to use local references to Categories, only static references. A second solution would be to use the LogManager/LoggerRepository class from log4j, that introduces a variable repository for Logger objects. The default repository would be the HierarchyMaintainer. All calls to getCategory/getLogger are redirected through the LogManager. After shutdown one could return a static "do nothing" category from the LogManager. Then, if you call the LogManager::getLogger("whatever") after shutdown of the log4cpp library you get a valid logger, but this logger will not do anything and all references to static Categories are still valid until the HierarchyMaintainer is deleted. ----- As a second solution I would like to say, that the Log4cppCleanup class wasn't that bad at all. I think now, that it was was simply wrong allocated. If you would do it with the auto_ptr method as described above and make a call to the Log4cppCleanup::getInstance function from all allocations of static variables it would have worked. static Log4cppCleanup::instance* = NULL; Log4cppCleanup::getInstance () { if (!instance) { // the auto_ptr will force the deletion of the Log4cppCleanup // after all depending objects have been deleted static std::auto_ptr <Log4cppCleanup> autoInstace (new Log4cppCleanup); instance = autoInstace.get (); } return instance; } HierarchyMaintainer& HierarchyMaintainer::getDefaultMaintainer() { if (!_defaultMaintainer) { // force the Cleanup class into the atExit queue Log4cppCleanup::getInstance (); // don't need the auto_ptr here, since all cleanup is done // via Log4ccpCleanup _defaultMaintainer = new HierarchyMaintainer(); } return *_defaultMaintainer; } ---------- I attach a patch to the CVS checkout from 14.04.2003 to implement all that stuff, except the proper handling of local categories during shutdown returned from LogManager::getLogger (). The patch includes also a change for the Appender::getAllAppenders to return a vector<Appender*>* and an additional method for the FileAppender to return its name. An last but not least I included a file named dontdiff to use for building diffs, to exclude unwanted files in the diff: > diff -Naur -X log4cpp/dontdiff ... Perhaps you can give me some feedback about the two proposed solutions. Thanks Dirk |
From: Szymanski J. <szy...@ya...> - 2003-04-15 15:12:12
|
Hi, Is there any way to get the thread name / id in with the PatternLayout ? I can see references to %t parameter in e.g. TCC_CONVERSION_PATTERN, but not inthe switch in PatternLayout::setConversionPattern There is as well ThreadNameComponent, which could be useful in this switch statement ... btw,As an answer to the last e-mail, I compile 0.3.4b without problems with VS7.I don't use the supplied project files from VS6, but created new project and added files manually. Remember to add only config-win32.h and no others config.h. cheers,--jakub --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. |
From: David R. <dre...@mo...> - 2003-04-13 08:24:36
|
Hello, 1. Could you post the changes you needed to make to the custom build rules for NTEventLogCategories.mc? I will merge them into the current CVS version. 2. I don't see any errors in the list of warnings that you posted below. What are the errors? Regards, David Resnick MobileSpear Inc. -----Original Message----- From: Conan Obrien [mailto:wha...@ya...]=20 Sent: Friday, April 11, 2003 21:32 To: log...@li... Subject: [Log4cpp-devel] 0.3.4b VS7 Does anyone have a reliable build of log4cpp using VS7? The current build 0.3.4b indicates that it was fixed to be compatible with VS7 but that's not the case. Proper custom build rules for NTEventLogCategories.mc in the log4cpp and log4cppDLL projects have to be adjusted. With these adjustments the following errors occur upon build: Task List E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256): warning C4101: 'e' : unreferenced local variable d:\MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256): warning C4101: 'e' : unreferenced local variable d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' Output ------ Rebuild All started: Project: log4cppDLL, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'log4cppDLL', configuration 'Release|Win32'. Performing Custom Build Step MC: Compiling d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cppDLL\..\NTEventLogCategories.mc Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Compiling... Win32DebugAppender.cpp TimeStamp.cpp StringUtil.cpp StringQueueAppender.cpp SimpleLayout.cpp SimpleConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' RollingFileAppender.cpp RemoteSyslogAppender.cpp PropertyConfiguratorImpl.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' PropertyConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' Properties.cpp Priority.cpp PortabilityImpl.cpp PatternLayout.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' \MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256) : warning C4101: 'e' : unreferenced local variable PThreads.cpp OstreamAppender.cpp OmniThreads.cpp NTEventLogAppender.cpp NDC.cpp MSThreads.cpp LoggingEvent.cpp LayoutAppender.cpp IdsaAppender.cpp HierarchyMaintainer.cpp FixedContextCategory.cpp Filter.cpp FileAppender.cpp DummyThreads.cpp DllMain.cpp Configurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' CategoryStream.cpp Category.cpp BasicLayout.cpp BasicConfigurator.cpp AppenderSkeleton.cpp Appender.cpp Compiling resources... Linking... Creating library .\Release/log4cpp.lib and object .\Release/log4cpp.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cppDLL\Release\BuildLog.h tm" log4cppDLL - 5 error(s), 6 warning(s) ------ Rebuild All started: Project: log4cpp, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'log4cpp', configuration 'Release|Win32'. Performing Custom Build Step MC: Compiling d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cpp\..\NTEventLogCategories.mc Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Compiling... Win32DebugAppender.cpp TimeStamp.cpp StringUtil.cpp StringQueueAppender.cpp SimpleLayout.cpp SimpleConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' RollingFileAppender.cpp RemoteSyslogAppender.cpp PropertyConfiguratorImpl.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' PropertyConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' Properties.cpp Priority.cpp PortabilityImpl.cpp PatternLayout.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' \MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256) : warning C4101: 'e' : unreferenced local variable PThreads.cpp OstreamAppender.cpp OmniThreads.cpp NTEventLogAppender.cpp NDC.cpp MSThreads.cpp LoggingEvent.cpp LayoutAppender.cpp IdsaAppender.cpp HierarchyMaintainer.cpp FixedContextCategory.cpp Filter.cpp FileAppender.cpp DummyThreads.cpp Configurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' CategoryStream.cpp Category.cpp BasicLayout.cpp BasicConfigurator.cpp AppenderSkeleton.cpp Appender.cpp Creating library... Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cpp\Release\BuildLog.htm" log4cpp - 5 error(s), 6 warning(s) ------ Rebuild All started: Project: testNDC, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testNDC', configuration 'Release|Win32'. Compiling... testNDC.cpp Linking... Creating library .\Release/testNDC.lib and object .\Release/testNDC.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testNDC\Release\BuildLog.htm" testNDC - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testMain, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testMain', configuration 'Release|Win32'. Compiling... testmain.cpp Linking... Creating library .\Release/testMain.lib and object .\Release/testMain.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testMain\Release\BuildLog.htm " testMain - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testDLL, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testDLL', configuration 'Release|Win32'. Compiling... testDLL.cpp Linking... Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testDLL\Release\BuildLog.htm" testDLL - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testCategory, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testCategory', configuration 'Release|Win32'. Compiling... testCategory.cpp Linking... Creating library .\Release/testCategory.lib and object .\Release/testCategory.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testCategory\Release\BuildLog .htm" testCategory - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testNTEventLog, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testNTEventLog', configuration 'Release|Win32'. Compiling... testNTEventLog.cpp Linking... Creating library .\Release/testNTEventLog.lib and object .\Release/testNTEventLog.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testNTEventLog\Release\BuildL og.htm" testNTEventLog - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testPattern, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testPattern', configuration 'Release|Win32'. Compiling... testPattern.cpp Linking... Creating library .\Release/testPattern.lib and object .\Release/testPattern.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testPattern\Release\BuildLog. htm" testPattern - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testPropConfig, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testPropConfig', configuration 'Release|Win32'. Compiling... testPropConfig.cpp Linking... Creating library .\Release/testPropConfig.lib and object .\Release/testPropConfig.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testPropConfig\Release\BuildL og.htm" testPropConfig - 0 error(s), 0 warning(s) ---------------------- Done ---------------------- Rebuild All: 7 succeeded, 2 failed, 0 skipped __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger=20 for complex code. Debugging C/C++ programs can leave you feeling lost and=20 disoriented. TotalView can help you find your way. Available on major UNIX=20 and Linux platforms. Try it free. www.etnus.com _______________________________________________ Log4cpp-devel mailing list Log...@li... https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |
From: Conan O. <wha...@ya...> - 2003-04-11 19:32:03
|
Does anyone have a reliable build of log4cpp using VS7? The current build 0.3.4b indicates that it was fixed to be compatible with VS7 but that's not the case. Proper custom build rules for NTEventLogCategories.mc in the log4cpp and log4cppDLL projects have to be adjusted. With these adjustments the following errors occur upon build: Task List E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137): see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256): warning C4101: 'e' : unreferenced local variable d:\MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256): warning C4101: 'e' : unreferenced local variable d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' d:\MyProjects\log4cpp-0.3.4b\include\log4cpp\Configurator.hh(21): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' Output ------ Rebuild All started: Project: log4cppDLL, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'log4cppDLL', configuration 'Release|Win32'. Performing Custom Build Step MC: Compiling d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cppDLL\..\NTEventLogCategories.mc Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Compiling... Win32DebugAppender.cpp TimeStamp.cpp StringUtil.cpp StringQueueAppender.cpp SimpleLayout.cpp SimpleConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' RollingFileAppender.cpp RemoteSyslogAppender.cpp PropertyConfiguratorImpl.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' PropertyConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' Properties.cpp Priority.cpp PortabilityImpl.cpp PatternLayout.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' \MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256) : warning C4101: 'e' : unreferenced local variable PThreads.cpp OstreamAppender.cpp OmniThreads.cpp NTEventLogAppender.cpp NDC.cpp MSThreads.cpp LoggingEvent.cpp LayoutAppender.cpp IdsaAppender.cpp HierarchyMaintainer.cpp FixedContextCategory.cpp Filter.cpp FileAppender.cpp DummyThreads.cpp DllMain.cpp Configurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' CategoryStream.cpp Category.cpp BasicLayout.cpp BasicConfigurator.cpp AppenderSkeleton.cpp Appender.cpp Compiling resources... Linking... Creating library .\Release/log4cpp.lib and object .\Release/log4cpp.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cppDLL\Release\BuildLog.htm" log4cppDLL - 5 error(s), 6 warning(s) ------ Rebuild All started: Project: log4cpp, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'log4cpp', configuration 'Release|Win32'. Performing Custom Build Step MC: Compiling d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cpp\..\NTEventLogCategories.mc Microsoft (R) Incremental Linker Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Compiling... Win32DebugAppender.cpp TimeStamp.cpp StringUtil.cpp StringQueueAppender.cpp SimpleLayout.cpp SimpleConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' RollingFileAppender.cpp RemoteSyslogAppender.cpp PropertyConfiguratorImpl.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' PropertyConfigurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' Properties.cpp Priority.cpp PortabilityImpl.cpp PatternLayout.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' \MyProjects\log4cpp-0.3.4b\src\PatternLayout.cpp(256) : warning C4101: 'e' : unreferenced local variable PThreads.cpp OstreamAppender.cpp OmniThreads.cpp NTEventLogAppender.cpp NDC.cpp MSThreads.cpp LoggingEvent.cpp LayoutAppender.cpp IdsaAppender.cpp HierarchyMaintainer.cpp FixedContextCategory.cpp Filter.cpp FileAppender.cpp DummyThreads.cpp Configurator.cpp ..\..\include\log4cpp\Configurator.hh(21) : warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'log4cpp::ConfigureFailure' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdexcept(137) : see declaration of 'std::runtime_error' ..\..\include\log4cpp\Configurator.hh(21) : see declaration of 'log4cpp::ConfigureFailure' CategoryStream.cpp Category.cpp BasicLayout.cpp BasicConfigurator.cpp AppenderSkeleton.cpp Appender.cpp Creating library... Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\log4cpp\Release\BuildLog.htm" log4cpp - 5 error(s), 6 warning(s) ------ Rebuild All started: Project: testNDC, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testNDC', configuration 'Release|Win32'. Compiling... testNDC.cpp Linking... Creating library .\Release/testNDC.lib and object .\Release/testNDC.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testNDC\Release\BuildLog.htm" testNDC - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testMain, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testMain', configuration 'Release|Win32'. Compiling... testmain.cpp Linking... Creating library .\Release/testMain.lib and object .\Release/testMain.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testMain\Release\BuildLog.htm" testMain - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testDLL, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testDLL', configuration 'Release|Win32'. Compiling... testDLL.cpp Linking... Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testDLL\Release\BuildLog.htm" testDLL - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testCategory, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testCategory', configuration 'Release|Win32'. Compiling... testCategory.cpp Linking... Creating library .\Release/testCategory.lib and object .\Release/testCategory.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testCategory\Release\BuildLog.htm" testCategory - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testNTEventLog, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testNTEventLog', configuration 'Release|Win32'. Compiling... testNTEventLog.cpp Linking... Creating library .\Release/testNTEventLog.lib and object .\Release/testNTEventLog.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testNTEventLog\Release\BuildLog.htm" testNTEventLog - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testPattern, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testPattern', configuration 'Release|Win32'. Compiling... testPattern.cpp Linking... Creating library .\Release/testPattern.lib and object .\Release/testPattern.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testPattern\Release\BuildLog.htm" testPattern - 0 error(s), 0 warning(s) ------ Rebuild All started: Project: testPropConfig, Configuration: Release Win32 ------ Deleting intermediate files and output files for project 'testPropConfig', configuration 'Release|Win32'. Compiling... testPropConfig.cpp Linking... Creating library .\Release/testPropConfig.lib and object .\Release/testPropConfig.exp Build log was saved at "file://d:\MyProjects\log4cpp-0.3.4b\msvc6\testPropConfig\Release\BuildLog.htm" testPropConfig - 0 error(s), 0 warning(s) ---------------------- Done ---------------------- Rebuild All: 7 succeeded, 2 failed, 0 skipped __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com |
From: Dirk L. <di...@no...> - 2003-04-08 07:37:02
|
Hi Bastiaan, > Changing the NDC and/or LoggingEvent classes for such a specific purpose > doesn't sound like a good idea. > Log4j has a class MDC ("Mapped Diagnostic Context"), besides the NDC. It > essentially is a thread specific string to string mapping. So instead of > cluttering the NDC, you can put the indentation level in a separate > mapping. You'll have to write the push() and pop() methods yourself in > this case, but that shouldn't be difficult. > At the moment, log4cpp doesn't have an MDC implementation, but it would > be easy to add one. I had a look into the MDC from log4j. I didn't knew about the MDC before. As you said, it is not difficult to add support for the MDC to log4cpp, I can do this if you like. But it seems to be like an overkill for the very trivial problem of incrementing and decremeting an indentation value. I must agree, that the MDC is a more general solution, and that log4cpp should stay as close to log4j as possible. I can not program in java, so I have one question. During logging the MDC lookup of a key is done in the current thread MDC. The MDC is not copied by default into the LoggingEvent, only explictly when using the AsyncAppender and during the writeObject method. Form the methodName I would expect that the writeObject is called during serialization of the LoggingEvent. A simple copy of the LoggingEvent would not copy the MDC. But why does log4j not serialize the threads MDC directly during the writeObject method? Why must there be a copy within the LoggingEvent object? Is the serialization prozess asynchron, or does the "defaultWriteObject" in java serialize only class member variables? But why not have a writeMDC method like there is a writeLevel method? As I said, I have no experience in java, yet :-) Dirk |
From: Bastiaan B. <Bas...@li...> - 2003-04-07 16:03:08
|
On Tue, 2003-03-25 at 15:50, Tony Cheung wrote: > Hi, > > Is there any plan to make use of the macros __FILE__ and __LINE__ to log > the filename and the line numbers automatically? > No. If you add informative log messages to your code, locating the code fragment corresponding with the log message is trivial without file names and line numbers. So I wouldn't want to add methods to Category or LoggingEvent to support this. If anything, Category should stay small and simple, I already regret making it subclassable :-/ A basic workaorund is to prefix your log messages with filename and line numbers by having the compilere concatenate the necessary string constants. That doesn't allow dynamic layouting of these parameters but it does give you the data. Good luck, Bastiaan > I am thinking of adding two parameters, line number and filename, to all > logging functions. For example, we add Category::info(int lineNumber, > const char* filename, const char* stringFormat, ...) and add two members > lineNumber, filename to LoggingEvent. In this way, the Layout classes > could make use of the lineNumber and filename, if exist. > > Then one could use category.info(__LINE__, __FILE__, "server started"), > instead of category.info("%s %d server started", __FILE__, __LINE). > > Any idea? > > Tony > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |
From: Bastiaan B. <Bas...@li...> - 2003-04-07 15:34:14
|
On Thu, 2003-04-03 at 16:14, O'Rourke, Frank wrote: > I am using the log4cpp-0.3.4b version of log4cpp. > > I have 2 components in a product which each use log4cpp and try to > initialise it. > > Is there a way of detecting whether log4cpp has already being configured. I > tried using > log4cpp::Category& root = log4cpp::Category::getRoot(); > log4cpp::AppenderSet appenders = root.getAllAppenders(); > int size = appenders.size(); > > then test (size > 1) for already initialised > > The problem is that getAllAppenders does not work on MSVC as reported and > fixed by patch. Is there any alternative way of telling if log4cpp is > already configured. No, currently there isn't a way to check this. That's because log4cpp doesn't require an application to explicitly 'initialize' log4cpp: all Objects and methods should work upon first use of log4cpp. Of course your logging may not end up where you want it too.... Since the configuration of your logging is not an issue for a single component but for your whole application, I'd suggest you move the configuration calls, both PropertyConfigurator::configure() or manual Category::addAppender(), out of the components into the initialization part of your application. The componentents may are allowed to call Category::debug(), etc. before you've done the configuration. Good luck, Bastiaan > > Thanks > Frank > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |
From: Andreas H. <and...@mo...> - 2003-04-07 13:24:37
|
Hello, we are using a log4j based logging framework and graphical log browser. Now we would need to log from a C++ application to that log4j based log server. Has anyone thought about an appender for log4cpp that is compatible with the log4j SocketServer? Any thoughts about this? Cheers, Andreas |
From: Bastiaan B. <Bas...@li...> - 2003-04-07 13:24:08
|
Hi Dirk, Changing the NDC and/or LoggingEvent classes for such a specific purpose doesn't sound like a good idea. Log4j has a class MDC ("Mapped Diagnostic Context"), besides the NDC. It essentially is a thread specific string to string mapping. So instead of cluttering the NDC, you can put the indentation level in a separate mapping. You'll have to write the push() and pop() methods yourself in this case, but that shouldn't be difficult. At the moment, log4cpp doesn't have an MDC implementation, but it would be easy to add one. Cheers, Bastiaan On Fri, 2003-04-04 at 11:44, Dirk Luetjens wrote: > Hi, > > I would like to add tracing (function call hierarchy) to my application > by adding a trace/log statement as a first command to each function > call. The output should be formatted in a way, that there is an > increasing indentation for each function call (and some possible > following TRACE statments). > > The reason for this is, that I redirect all TRACE (::AfxTrace/afxDump in > a WIN32/MFC app) messages to a "TRACE" category. I would like to add the > function name and a calling depth to the output to better see the > program flow and the context of the TRACE calls (there are some nice > function that can print the called function and the parameters to > produce something like a stackdump in the imagehelp.dll). > > My problem is the implementation of the indentation. It is very easy to > add a automatic class that increases/decreases the indentation level > during entering and leaving the function and adding the indentation to > all TRACE calls. But I would be very good if I could add this > information to all logging calls. > > I know, that there is the NDC for the purpose to store some global > information for all following logging calls. But the NDC seems more like > a place to store information about the state of the application, like > current client/server pair, current state, and so on. Misusing the NDC > to simply store two blanks during entering a function and removing these > blanks during leaving seems to be like a performance kill. And you would > not exactly loose the stored state information about the current thread > but you will loose the nice formatting, since indentation spaces and > stored information is mixed within the synthetizied NDC string. > > My question is, wether it would make sence to add a indentation level to > the NDC and to the LoggingEvent? To the NDC, since there is always one > NDC (?) per thread and therefore one central object for this type of > information and to the LoggingEvent so that one can have control over > the output of the indentation within the PatternLayout. > > Thanks for your answers > Dirk > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |
From: Dirk L. <di...@no...> - 2003-04-04 09:44:42
|
Hi, I would like to add tracing (function call hierarchy) to my application by adding a trace/log statement as a first command to each function call. The output should be formatted in a way, that there is an increasing indentation for each function call (and some possible following TRACE statments). The reason for this is, that I redirect all TRACE (::AfxTrace/afxDump in a WIN32/MFC app) messages to a "TRACE" category. I would like to add the function name and a calling depth to the output to better see the program flow and the context of the TRACE calls (there are some nice function that can print the called function and the parameters to produce something like a stackdump in the imagehelp.dll). My problem is the implementation of the indentation. It is very easy to add a automatic class that increases/decreases the indentation level during entering and leaving the function and adding the indentation to all TRACE calls. But I would be very good if I could add this information to all logging calls. I know, that there is the NDC for the purpose to store some global information for all following logging calls. But the NDC seems more like a place to store information about the state of the application, like current client/server pair, current state, and so on. Misusing the NDC to simply store two blanks during entering a function and removing these blanks during leaving seems to be like a performance kill. And you would not exactly loose the stored state information about the current thread but you will loose the nice formatting, since indentation spaces and stored information is mixed within the synthetizied NDC string. My question is, wether it would make sence to add a indentation level to the NDC and to the LoggingEvent? To the NDC, since there is always one NDC (?) per thread and therefore one central object for this type of information and to the LoggingEvent so that one can have control over the output of the indentation within the PatternLayout. Thanks for your answers Dirk |
From: D. L. <lo...@no...> - 2003-04-04 09:02:34
|
Hi, one/two small questions about the PropertyConfigurator: I wrote a custom Appender that sends logging information to an CEditView in a WIN32/MFC based application. For now, I create the new CEditViewAppender programmatically, but I would like to create appenders like this via the PropertyConfigurator. But the PropertyConfigurator forwards the configuration to a complete internal class (the PropertyConfiguratorImpl) and is therefore not extensible to support new types of appenders. My first question is more a design question, why you have chosen this type of separation, where the PropertyConfigurator acts only as a ProxyClass (I think this is the right term for this design pattern) for some library internal functionality? Is there any reason for not exposing the PropertyConfiguratorImpl to the public except encapsulation? Second I asked myself how to add custom appenders within this type of architecture. As long as I can't derive from the PropertyConfiguratorImpl to support custom Appenders, I must register my new appender with the library. For example via a MyAppenderBuilder. Is there any work ongoing in this direction, or is the design already done but the implementation missing? I would like to spend some time in implementing such a functionality but would like to do it in a way, that will fit into the overall design of the library. I'm not sure how this is done within log4j, if there is any possibility like this anyway. Thanks for clarification Dirk |
From: O'Rourke, F. <F.O...@em...> - 2003-04-03 14:17:00
|
I am using the log4cpp-0.3.4b version of log4cpp. I have 2 components in a product which each use log4cpp and try to initialise it. Is there a way of detecting whether log4cpp has already being configured. I tried using log4cpp::Category& root = log4cpp::Category::getRoot(); log4cpp::AppenderSet appenders = root.getAllAppenders(); int size = appenders.size(); then test (size > 1) for already initialised The problem is that getAllAppenders does not work on MSVC as reported and fixed by patch. Is there any alternative way of telling if log4cpp is already configured. Thanks Frank |
From: Tony C. <dra...@as...> - 2003-03-25 14:51:42
|
Hi, Is there any plan to make use of the macros __FILE__ and __LINE__ to log the filename and the line numbers automatically? I am thinking of adding two parameters, line number and filename, to all logging functions. For example, we add Category::info(int lineNumber, const char* filename, const char* stringFormat, ...) and add two members lineNumber, filename to LoggingEvent. In this way, the Layout classes could make use of the lineNumber and filename, if exist. Then one could use category.info(__LINE__, __FILE__, "server started"), instead of category.info("%s %d server started", __FILE__, __LINE). Any idea? Tony |
From: Tony C. <dra...@as...> - 2003-03-25 03:26:49
|
Hi all, Is there any latest update on multi-threading supporting on log4cpp? I see the following question in the homepage, but there is no answer there. 3.2. Is log4cpp thread-safe? I think we would need a detail description of the thread-safe issues of log4cpp. Specifically, we need to know which API are thread-safe, which API are not. Users may appreciate if there are some examples to show the threading issues. Are they available in any form now? Thank you. Tony Cheung |