LostInKadath opened a new issue, #697:
URL: https://github.com/apache/logging-log4cxx/issues/697

   Here are two _LogSetts.txt_ files that differ in one letter:
   ```
   log4j.appender.R = org.apache.log4j.RollingFileAppender
   log4j.appender.R.File = filename.log
   log4j.appender.R.MaxFileSize = 5KB
   log4j.appender.R.MaxBackupIndex = 10
   ...
   ```
   ```
   log4j.appender.R = org.apache.log4j.RollingFileAppender
   log4j.appender.R.file = filename.log
   log4j.appender.R.MaxFileSize = 5KB
   log4j.appender.R.MaxBackupIndex = 10
   ...
   ```
   After parsing _Logsetts.txt_ file, all properties are stored in `std::map` 
-- meaning that properties are processed in lexicographical order. For the 
first file `File` is processed before `MaxBackupIndex`. For the second one -- 
`file` is processed **after** `MaxBackupIndex`.
   
   Why is this a problem? While `MaxBackupIndex` processing 
`FileAppender::getFile()` method is called ([link for rel/v1.6.1 
tag](https://github.com/apache/logging-log4cxx/blob/59c99c78f8a23d8b3b3ea1e827669fc67b31dcb8/src/main/cpp/rollingfileappender.cpp#L96)).
 But `_priv->fileName` is empty -- it's initialized only after `file` parameter 
is processed.
   
   That breaks logic for generating rolling file names -- and rolling stops 
working at all.
   
   I haven't found any limitations for parameters case sensitivity. Moreover, 
parameters are checked in a case-insensitive way while processing. But this 
logic is incomplete and may even mislead a little bit.


-- 
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