Can I configure a RollingAppender/Sifter to NOT keep a file if a certain condition is not met? For example, I don’t want to save rolled files that don’t have at least one logged statement of WARN level or higher.
Here is my use case: have a sifter that creates multiple files – one per transaction. There are thousands of transactions in my system. I only want a transaction log file saved if there is something interesting about that particular transaction. For me, “interesting” is a WARN or ERROR statement in the log file.
I don’t know if this would be part of the RollingFileAppender or maybe something done when the sifter times out.
Any advice?
Thanks!
Sean