Provides the means to log debug text to various log areas and at various severity levels and send it to a MODSERIAL serial port object for output.

Revision:
0:23f7bb983ae0
Child:
1:e1be56fa979a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logger_defs.h	Fri Jun 02 16:54:30 2017 +0000
@@ -0,0 +1,47 @@
+//*********************************************************************************************************************
+//   LOGGER DEFINITIONS - HEADER FILE
+//   PAUL HARRIS, OCTOBER 2016
+// *********************************************************************************************************************
+
+#ifndef LOGGER_DEFS_H
+#define LOGGER_DEFS_H
+
+enum eLogLevel{
+    SUPPRESSED  = 0,
+    ERROR       = 1,
+    WARNING     = 2,
+    NORMAL      = 3,
+    DETAILED    = 4,
+    VERBOSE     = 5
+};
+
+//Array of char pointers with name of log level enums for printing out (must match enums above)
+static const char* sLogLevel[] = {
+    "SUPPRESSED",
+    "ERROR",
+    "WARNING",
+    "NORMAL",
+    "DETAILED",
+    "VERBOSE"
+};
+
+enum eLogArea{
+    LOGGER          = 0, //Log area for the logger itself.  Required as an absolute minimum.
+    MAIN            = 1,
+    LIDAR_IF        = 2,
+    LIDAR           = 3,
+    MOTOR_CONTROL   = 4,
+    ENCODER         = 5
+};
+
+//Array of char pointers with name of log area enums for printing out (must match enums above)
+static const char* sLogArea[] = {
+    "LOGGER",
+    "MAIN",
+    "LIDAR_IF",
+    "LIDAR",
+    "MOTOR_CONTROL",
+    "ENCODER"
+};
+
+#endif
\ No newline at end of file