Thanks for looking into this. If I remember correctly the use case was this: the application runs different "jobs" at different times. The MDCFilter was used to write the log data from the different jobs to separate files. When no job runs, it should forward log data to a file without job ID suffix. So I just removed the key/value pair, and it crashed with an NPE. I still think that making the MDC key/value properties optional is an improvement. Maybe I should have added more JavaDoc to explain the exact behavior. key != null --> value must match based on equals() key == null --> anything will match (even null) What do you think? |