Syslog client for mbed-os 5
Fork of logger by
Revision 6:cf9acc20f954, committed 2016-10-20
- Comitter:
- Colin Hogben
- Date:
- Thu Oct 20 13:57:59 2016 +0100
- Parent:
- 5:641de66579d2
- Commit message:
- Add configuration parameters
Changed in this revision
--- a/Logger.cpp Fri Oct 14 15:58:13 2016 +0100
+++ b/Logger.cpp Thu Oct 20 13:57:59 2016 +0100
@@ -5,14 +5,19 @@
* Released under the MIT License: http://mbed.org/license/mit
*/
-/** @file logger.cpp
+/** @file Logger.cpp
* @brief syslog device (sender/client)
*/
#include "Logger.h"
#include <cstdio>
+#ifdef MBED_CONF_LOGGER_LINE_MAX
+#define LOG_LEN MBED_CONF_LOGGER_LINE_MAX
+#else
#define LOG_LEN 256
+#endif
+
#define LOG_UDPPORT 514
static const char mstr[12][4] = {
--- a/Logger.h Fri Oct 14 15:58:13 2016 +0100 +++ b/Logger.h Thu Oct 20 13:57:59 2016 +0100 @@ -5,7 +5,7 @@ * Released under the MIT License: http://mbed.org/license/mit */ -/** @file logger.h +/** @file Logger.h * @brief syslog device (sender/client) */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed_lib.json Thu Oct 20 13:57:59 2016 +0100
@@ -0,0 +1,10 @@
+{
+ "name": "logger",
+ "config": {
+ "present": 1,
+ "line-max": {
+ "help": "Maximum length of line",
+ "value": 256
+ }
+ }
+}
