Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding debug output

  • Loading branch information...
commit 03340fb28b011bc18c368405d2f5c3a4e79e79fb 1 parent 932c170
Jonathan Creasy authored April 13, 2012
35  src/main/java/com/admob/rocksteady/reactor/Console.java
... ...
@@ -0,0 +1,35 @@
  1
+package com.admob.rocksteady.reactor;
  2
+
  3
+import org.slf4j.Logger;
  4
+
  5
+import org.slf4j.LoggerFactory;
  6
+import com.espertech.esper.client.EventBean;
  7
+import com.espertech.esper.client.UpdateListener;
  8
+
  9
+public class Console implements UpdateListener {
  10
+	private static final Logger logger = LoggerFactory
  11
+			.getLogger(Alerting.class);
  12
+
  13
+	@Override
  14
+	public void update(EventBean[] newEvents, EventBean[] oldEvents) {
  15
+		// TODO Auto-generated method stub
  16
+		if (newEvents == null) {
  17
+			return;
  18
+		}
  19
+
  20
+		Integer i = 0;
  21
+
  22
+		for (EventBean newEvent : newEvents) {
  23
+			i++;
  24
+			try {
  25
+				String msg = "";
  26
+				msg += newEvent.toString();
  27
+				logger.info(msg);
  28
+			} catch (Exception e) {
  29
+				logger.error("Error: " + newEvent.toString() + " - " + e.getMessage());
  30
+			}
  31
+
  32
+		}
  33
+	}
  34
+
  35
+}

0 notes on commit 03340fb

Please sign in to comment.
Something went wrong with that request. Please try again.