phanindra798 commented on issue #3083:
URL: 
https://github.com/apache/logging-log4j2/issues/3083#issuecomment-6763242154

   Hi, I'd like to work on this issue.
   
   Following @ppkarwasz's comment that generic features like `createOnDemand` 
should be supported by all five file appenders, I checked the current `2.x` 
code. `FileAppender` and `RollingFileAppender` support it, but these three do 
not:
   
   - `RollingRandomAccessFileAppender`
   - `RandomAccessFileAppender`
   - `MemoryMappedFileAppender`
   
   My plan:
   - Add a `createOnDemand` attribute to the builders of these three appenders.
   - Add new overloads of the corresponding manager factory methods and 
constructors that accept `createOnDemand`, keeping the existing public 
signatures for binary compatibility.
   - When `createOnDemand` is `true`, skip creating the file and parent 
directories at startup, and create them on the first log event (as 
`RollingFileManager` does).
   - Add tests for each appender (similar to 
`RollingFileManagerCreateOnDemandTest`) and a changelog entry.
   
   Two questions:
   1. Would you prefer one PR for all three appenders, or separate PRs 
(starting with `RollingRandomAccessFileAppender`)?
   2. For `MemoryMappedFileAppender`, the file must exist before it can be 
mapped, so on-demand creation would delay both file creation and mapping until 
the first event. Is that acceptable, or would you rather leave this appender 
out?
   
   Could you assign this issue to me?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to