Question

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

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top