FluentLogger sample for GR-PEACH

Dependencies:   EthernetInterface FluentLogger

Revision:
1:0a8269ab9a47
Parent:
0:5edb05436aa5
Child:
2:f5d11b69b6f8
diff -r 5edb05436aa5 -r 0a8269ab9a47 main.cpp
--- a/main.cpp	Sat Jan 10 07:59:12 2015 +0000
+++ b/main.cpp	Tue Jan 20 14:13:21 2015 +0000
@@ -20,6 +20,7 @@
 
 EthernetInterface eth;
 FluentLogger logger("192.168.0.1");  // please set your Fluentd server
+Serial pc(USBTX, USBRX);
 
 int main() 
 {
@@ -27,8 +28,13 @@
     eth.init(); //Use DHCP
     eth.connect();
     while(1) {
-       logger.log("debug.test", "Hello mbed"); //message body is simple string
-       wait_ms(5000);
+       uint32_t t1 = us_ticker_read();
+       logger.log("debug.test", "Hello GR-PEACH"); //message body is simple string
+       uint32_t t2 = us_ticker_read();
+        wait_ms(5000);
+       uint32_t t3 = us_ticker_read();
+       pc.printf("t1:%u t2:%u t3:%u t2-t1:%u t3-t2:%u\r\n", t1, t2, t3, (t2-t1), (t3-t2));
+//       Thread::wait(5000);
     }
     logger.close();
     eth.disconnect();