Post has attachment
I have released log4cplus 2.0.0-RC1. It is the first C++11 based release.


- *IMPORTANT*: Implementation language is now C++11. OS specific implementations have been replaced by C++11 facilities wherever possible. This lowers complexity of the library and improves maintainability but it also brings limitations to when the library can be used. Specifically, the library should not be used before `main()` is entered and after `main()` is left. Even more specifically, the library should not be used during global objects construction and destruction.

- log4cplus uses Catch unit testing framework and hand unit tests.

- log4cplus supports IPv6.

- Autotools based build system is now partially generated from templates by the Autogen tool.

- Autotools based build system can build both `wchar_t` and plain `char` variants at once.


Post has shared content
I have released log4cplus 1.2.1-RC1. It is a bugs fixing release.

- Fixed GitHub bug #205. Fixed AsyncAppender shutdown crash.

- Fixed GitHub bug #195. Check if queue thread pointer is not NULL and if it is running before trying to join it.

- Fixed GitHub bug #136. Adjust weekly, daily and twice daily rollover time for DailyRollingFileAppender by time zone offset so that the rollover happens at midnight, etc., of local time instead of UTC time.

- Fixed GitHub bug #148. TTCCLayout boolean members could be left uninitialized. Initialize them.

- Fixed GitHub bug #163. Fixed Visual Studio 2015 build with CMake. Compilation fails not finding FreeAddrInfoW().

- Disabled use of __thread on iOS.

- Fixed SF#333. AsyncAppender's appenders need to be closed so that accumulated logs get flushed onto disk.

- Updated android.toolchain.cmake from OpenCV project.



Hi,

I have a really strange error using log4cplus.
My process exits with code 11. If I run it in the debugger, there is a "SIGSEGV: invalid address".
Here is the call stack:
pthread_join
log4cplus::thread::AbstractThread::join()
log4cplus::AsyncAppender::close()
log4cplus::spi::LoggerImpl::closeNestedAppenders()
log4cplus::Hierarchy::shutdown()
log4cplus::Hierarchy::~Hierarchy()

I have tried to simplify the code and here is what I have:
#include <iostream>
#include <log4cplus/logger.h>
#include <log4cplus/configurator.h>
int main()
{
log4cplus::PropertyConfigurator config("/tmp/log.txt");
config.configure();

return 0;
}

And the config file:
log4cplus.rootLogger=OFF, A1
log4cplus.logger.L1=OFF, A5
log4cplus.logger.L2=OFF, A2
log4cplus.logger.L4=OFF, A3
log4cplus.logger.L6=OFF, A4
log4cplus.logger.L7=OFF, A1

log4cplus.appender.A1=log4cplus::AsyncAppender
log4cplus.appender.A1.Appender=log4cplus::ConsoleAppender

log4cplus.appender.A2=log4cplus::AsyncAppender
log4cplus.appender.A2.Appender=log4cplus::ConsoleAppender

log4cplus.appender.A3=log4cplus::AsyncAppender
log4cplus.appender.A3.Appender=log4cplus::ConsoleAppender

log4cplus.appender.A4=log4cplus::AsyncAppender
log4cplus.appender.A4.Appender=log4cplus::ConsoleAppender

log4cplus.appender.A5=log4cplus::AsyncAppender
log4cplus.appender.A5.Appender=log4cplus::ConsoleAppender

If I change the logger name L7 to L6, I don't have an error anymore.
Actually, if I delete any configuration line, I don't have an error anymore but I noticed that the name of my logger L7 worried.

I use log4cplus 1.1.3-0.4.rc3.
Actually, I use it with centos7 and a newer version of log4cplus is not available with yum.

I have a workaround for my problem, putting an "A" before the logger name which has a problem so it's not blocking but I don't know when it will happen again because I don't understand why the name is a problem.

If this problem is fixed in a newer version, I can manualy upgrade the library.

Thanks in advance.


Hi all,

I would like to add a log message to every appender configured on start up of my process.
I need this to know if the process has restarted simply reading any log file.

I could get all appenders in each existing logger to call doAppend but i'm not sure it's the best solution.

Is it possible to get every appender without using loggers? Or should I have this information otherwise?

Thank you.



Post has shared content
I have release log4cplus 1.1.3-RC7. It is a bugs fixing release:

- Fixed SF#322. -- C++11 construct that should not be present.

- Fixed FreeAddrInfoA and FreeAddrInfoW not found. -- This required bump to minimal version to Windows XP SP2.

- Fixed missing thread's alternative name. -- GitHub bug #137.

- Fixed GitHub bug #155. -- Process shutdown issues.

- Fixed GitHub bug #136. -- Adjust weekly, daily and twice daily rollover time for DailyRollingFileAppender by time zone offset so that the rollover happens at midnight, etc., of local time instead of UTC time.

- Fixed CMake/Visual Studio 2010 compilation. -- GitHub issue #188.

Hi,
First apologies if this is not the right place
I have a multithreaded app where I need to send the output of each thread to a separate log file (rotating one). I would like to use the properties file to configure the appender (file rotatating) and to create the loggers (one for each thread) programatically from the code.

Can I access the appender created in the properties file in my C++ code to attache it to a logger I just created?

Thanks.

I've been using log4cplus-1.2.0-rc3 in my application for some time; it works great linked dynamically. But, for portability reasons, I find that I must switch all libraries to being statically linked. I have done this easily by using BUILD_SHARED_LIBS=false, linking against log4cplusS, and adding '# define LOG4CPLUS_STATIC' to the appropriate header. However, I now find that linking fails specifically on log4cplus: 'undefined reference to log4cplus::BasicConfigurator'...etc. Any idea why?

Hi, is there a way to have the PID as part of the filename in the configration of a FileAppender. I have more processes and I would like them to share the same config file but to have each of them writing in its own log file. Is this possible to achieve with log4cplus?

something like: 

log4cplus.appender.LOG=log4cplus::FileAppender
log4cplus.appender.LOG.File=c:\temp\trace_p-%-5.5p.log

Post has shared content
I have released log4cplus 1.2.0. The changes from the last release candidate are minimal:

- Fixed SourceForge bug #324, MinGW compilation issue. Use InterlockedExchangeAdd instead of InterlockedAdd. The former is supported by older MinGW.

- Fixed GitHub bug #137. Fix missing thread's alternative name.

I have released log4cplus 1.2.0-RC6:

- Fixed Visual Studio build issue #322 related to WinSock functions being used and second about C++11 syntax. This forces minimum version of Windows supported by this release to Windows XP SP2.

- Added DatePattern property to DailyRollingFileAppender configuration -- This property specifies filename suffix pattern to use for periodical backups of the logfile. (Alexey Morozov)

- Added RollOnClose property to DailyRollingFileAppender and TimeBasedRollingFileAppender configuration -- This property specifies whether to rollover log files upon shutdown. By default it's set to true to retain compatibility with legacy code. (Alexey Morozov)

- Normalized line endings, used .gitattributes to enforce it.

https://sourceforge.net/p/log4cplus/news/2016/01/log4cplus-120-rc6-released/
Wait while more posts are being loaded