At 12:46 AM 2/12/2005, you wrote:
After porting the backslash stripping code back to log4cxx, I decided that I liked the stripDuplicateBackslashes better on FileAppender (where it is in log4cxx) than in OptionConverter and started to move it in my working copy of log4j. However, I ran into the problem of not having a good home for the associated unit tests and abandoned that effort.

Unfortunately, I was coerced into doing a good thing when I unintentionally committed my modified FileAppender when removing DBAppender2. At that point, I was compelled to remove the duplicate code from OptionConverter (I reverted it back to v 1.51) and change the unit test code in OptionSubstitutionTest to point to the new home in FileAppender.

All code which is concerned with transforming options is located within OptionConverter. Moving stripDuplicateBackslashes into FileAppender kind of breaks that rule. What would happen if another appender needed to make the same kind of transformation? In the future, we could have another hierarchy of appenders writing to files. Consequently, I'd recommend that stripDuplicateBackslashes be moved to OptionConverter.


If there are no objection, I'll go ahead and add stripDuplicateBackslashes to OptionConverter.

I would have loved to move the unit test from OptionSubstitutionTest to a more appropriate home (for example, FileAppenderTestCase where it lives in the log4cxx test suite), however there does not seem to be a good home for simple unit tests. All the test targets in the ant build appear to be related to some functional aspect of log4j. Did I miss something or how about an "internal" test suite and associated ant target that would be the home for these types of tests.

I think the ./tests/ is a good home for all tests. What we need to do is to run most tests in a batch instead of defining each test individually. Tests that need to be run individually can be excluded from the batch. I'll do the necessary changes shortly.




--
Ceki G�lc�

  The complete log4j manual: http://www.qos.ch/log4j/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to