[logback-user] Evaluators and Markers - no applicable action

buzzterrier terry.jeske at gmail.com
Thu May 20 17:24:18 CEST 2010

Thx. Ceki, that works, but I have a question about how the filtering works:

  Java Main:

	public static void main(String[] args) {
		Marker notifyAdminMarker = MarkerFactory.getMarker("NOTIFY_ADMIN");
		Logger logger = LoggerFactory.getLogger(LogBackTest.class);
		logger.debug("This is a regular debug message");
		logger.debug(notifyAdminMarker,	"Serious issue");

Logback.xml snippet:

   <appender name="EMAIL"
     <filter class="ch.qos.logback.core.filter.EvaluatorFilter">      

      <pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>


Running the above java and appender I get:
08:10:39.183 DEBUG aero.blue.logtest.LogBackTest - This is a regular debug
08:10:39.190 DEBUG aero.blue.logtest.LogBackTest - Serious issue

I expected to just get the Serious Issue line.

Further, if I change the eval logic to Not match i.e.:

I get:
08:16:47.035 DEBUG aero.blue.logtest.LogBackTest - This is a regular debug
Which is what I would expect, so is the inverse not working?


http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... 
View this message in context: http://old.nabble.com/Evaluators-and-Markers----no-applicable-action-tp28609431p28622819.html
Sent from the Logback User mailing list archive at Nabble.com.

More information about the Logback-user mailing list