123456789101112131415161718192021 |
- package camel.log;
- import ch.qos.logback.classic.net.JMSTopicAppender;
- import ch.qos.logback.classic.spi.ILoggingEvent;
- import java.util.Map;
- /**
- * Created by l4qiang on 2017-04-12.
- */
- public class JmsAppender extends JMSTopicAppender {
- @Override
- public void append(ILoggingEvent event) {
- Map<String, String> mdcPropertyMap = event.getMDCPropertyMap();
- if (mdcPropertyMap.size() == 0) {
- return;
- }
- System.out.println(event.getMessage());
- super.append(event);
- }
- }
|