Sample for the FluentLogger library.
Dependencies: EthernetInterface FluentLogger mbed-rtos mbed
Example for simple message logging.
main.cpp
#include "mbed.h" #include "rtos.h" #include "EthernetInterface.h" #include "FluentLogger.h" EthernetInterface eth; FluentLogger logger("192.168.0.1"); // please set your Fluentd server int main() { eth.init(); //Use DHCP eth.connect(); while(1) { logger.log("debug.mbed", "Hello mbed"); //message body is simple string wait_ms(10000); } logger.close(); eth.disconnect(); }
Server Configuration
Fluentd daemon must be lauched with the following configuration:
<source> type tcp port 24224 </source> <match debug.**> type stdout </match>
History
update sample
2014-12-15, by YuuichiAkagawa [Mon, 15 Dec 2014 15:41:47 +0000] rev 1
update sample
Initial release
2014-11-11, by YuuichiAkagawa [Tue, 11 Nov 2014 12:59:34 +0000] rev 0
Initial release