1

I read some examples of log4cplus. But I've never found an example of finalization of log4cplus. So is there no need to finalize log4cplus by myself? log4cplus finalize by itself after an application finished. http://sourceforge.net/p/log4cplus/wiki/CodeExamples/

And one more question. Are there any way to create a new log file with every run of the application? I want to use timestamp for log file name.

log4cplus.appender.MyApp.FilenamePattern=D{%H:%M:%S}_MyApp.log
jef
  • 3,890
  • 10
  • 42
  • 76
  • In C++ destructors do final cleanup, immediately when an object is destroyed, such as when the execution leaves the scope of a log object. – Cheers and hth. - Alf Feb 12 '15 at 01:35
  • Thanks for your comment. I know scope rules in c++. But what I want to know is whether log4cplus is safe without finalization or not. If log4cplus gets heap memory, a user must finalize log4cplus. – jef Feb 20 '15 at 11:03
  • All I can think of is to ask the author(s). The SourceForge page gives link to Google blog, (https://plus.google.com/communities/117815353450765593933). Perhaps try there, and post back result here? – Cheers and hth. - Alf Feb 20 '15 at 11:53

0 Answers0