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.

logger_defs.h

Committer:
paul_harris77
Date:
2017-06-02
Revision:
0:23f7bb983ae0
Child:
1:e1be56fa979a

File content as of revision 0:23f7bb983ae0:

//*********************************************************************************************************************
//   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