Skip to content

Adds multiple process support to the BufferedWriter class#112

Merged
rm5248 merged 1 commit intoapache:masterfrom
rprevot:buffered-rolling-file-appender
Jun 13, 2022
Merged

Adds multiple process support to the BufferedWriter class#112
rm5248 merged 1 commit intoapache:masterfrom
rprevot:buffered-rolling-file-appender

Conversation

@rprevot
Copy link
Contributor

@rprevot rprevot commented Jun 12, 2022

This pull request adds multiple process support to the BufferedWriter class.

Without this patch, enabling I/O buffering for a file appender generates an error at application startup when log4cxx has been compiled with the multi-process flag set (-DCMAKE_CXX_FLAGS="-DLOG4CXX_MULTI_PROCESS") :

terminate called after throwing an instance of 'std::logic_error'
what(): getOutPutStreamPtr must be implemented in the derived class that you are using
Aborted (core dumped)

Example of configuration:

log4j.appender.State=RollingFileAppender
log4j.appender.State.layout=PatternLayout
log4j.appender.State.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS Z} %t [%p] %m%n
log4j.appender.State.file=${logdir}/state.log
log4j.appender.State.bufferedIO=true
log4j.appender.State.bufferSize=8192
...

@rm5248 rm5248 merged commit 13b7325 into apache:master Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants