I am trying to understand the differences between the Evaluator property and the LossyEvaluator, of the BufferingForwardingAppender.
I want my appender to be lossy, buffering only 50 messages, and dumping them only if a new LogEvent is Warn of above. Should I use the LevelEvaluator in the LossyEvaluator or the “normal” one?
I’d also like to set up my logging so that all Info messages go through to the file, and not get lost inside the buffer. Is it possible?
I am trying to understand the differences between the Evaluator property and the LossyEvaluator
Share
I did not use it yet but looking at the source code I think the
LossyEvaluatordecides which events that normally would get discarded are written to the log file anyway. So setting the normal evaluator toWARNand the lossy evaluator toINFOshould behave the way you want.Edit: Just made a little test and it works as I thought.