سؤال

When i use RollingFileAppender with Log4cplus,Log4cplus "LOCK" the file.

How can set "minimal" lock so that it does NOT LOCK the file?

هل كانت مفيدة؟

المحلول

Log4cplus supports synchronization between processes only in trunk, you would have to get version 1.1.0-RC2. Log4cplus keeps log files open the whole time the appender it belongs to exists, so log files on Windows are likely not deletable. Having the option to open log file only on demand is interesting idea. I would suggest logging into separate files for each processes to avoid the need for the locking and to make deleting files easier.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top