FluentLogger: fluent-logger-mbed A structured logger for Fluentd (mbed)
Dependents: FluentLogger_Hello SNIC-FluentLogger-example
FluentLogger Class Reference
Fluent Logger for mbed. More...
#include <FluentLogger.h>
Public Member Functions | |
FluentLogger (const char *host, const int port=24224, uint32_t bufsize=128) | |
Create a FluentLogger instance. | |
int | open () |
Open connection (automatically called on log) | |
int | close () |
Close connection (if you want) | |
int | log (const char *tag, const char *msg) |
Send simple string message to fluent server with tag. | |
int | log (const char *tag, uMP &msg) |
Send MassagePacked message to fluent server with tag. |
Detailed Description
Fluent Logger for mbed.
Definition at line 26 of file FluentLogger.h.
Constructor & Destructor Documentation
FluentLogger | ( | const char * | host, |
const int | port = 24224 , |
||
uint32_t | bufsize = 128 |
||
) |
Create a FluentLogger instance.
- Parameters:
-
host fluentd server hostname/ipaddress port fluentd server port (default: 24224) bufsize message buffer length (default: 128)
Definition at line 22 of file FluentLogger.cpp.
Member Function Documentation
int close | ( | ) |
Close connection (if you want)
- Return values:
-
0 Success -1 Failure
Definition at line 44 of file FluentLogger.cpp.
int log | ( | const char * | tag, |
uMP & | msg | ||
) |
Send MassagePacked message to fluent server with tag.
- Parameters:
-
tag tag msg MessagePacked message
- Return values:
-
0 Success -1 Failure
Definition at line 85 of file FluentLogger.cpp.
int log | ( | const char * | tag, |
const char * | msg | ||
) |
Send simple string message to fluent server with tag.
- Parameters:
-
tag tag msg null terminated string
- Return values:
-
0 Success -1 Failure
Definition at line 54 of file FluentLogger.cpp.
int open | ( | ) |
Open connection (automatically called on log)
- Return values:
-
0 Success -1 Failure
Definition at line 29 of file FluentLogger.cpp.
Generated on Sat Jul 16 2022 18:53:06 by 1.7.2