CoffeePi
Coffee machine control for Raspberry Pi
|
Go to the source code of this file.
Macros | |
#define | USE_COLORS |
#define | KNRM "\x1B[0m" |
#define | KRED "\x1B[31m" |
#define | KGRN "\x1B[32m" |
#define | KYEL "\x1B[33m" |
#define | KBLU "\x1B[34m" |
#define | KMAG "\x1B[35m" |
#define | KCYN "\x1B[36m" |
#define | KWHT "\x1B[37m" |
#define | CLEARLINE "\x1B[100D\x1B[1A\x1B[K" |
#define | KBOLD "\x1B[1m" |
Enumerations | |
enum | logger_type_t { LOG_INFO = 0, LOG_CAN = 1, LOG_OK = 2, LOG_WARN = 3, LOG_ERROR = 4, LOG_ERRORC = 5 } |
enum | logger_verbose_t { V_NONE = 0, V_BASIC = 1, V_BREW = 2, V_HAL = 3, V_SQL = 4, V_STRIPE = 5, V_SPI = 6 } |
Functions | |
void | logger_error (const char *format,...) |
Outputs the printf like formatted message to stderr and colorizes it. More... | |
void | logger_reset () |
Resets the logger to prevent the previous line being overdrawn. More... | |
void | logger (logger_verbose_t verboselevel, logger_type_t logtype, const char *format,...) |
prints the message to stdout and formats it More... | |
void | logger (logger_verbose_t verboselevel, const char *format,...) |
prints the message to stdout More... | |
#define CLEARLINE "\x1B[100D\x1B[1A\x1B[K" |
#define KBLU "\x1B[34m" |
#define KBOLD "\x1B[1m" |
#define KCYN "\x1B[36m" |
#define KGRN "\x1B[32m" |
#define KMAG "\x1B[35m" |
#define KNRM "\x1B[0m" |
#define KRED "\x1B[31m" |
#define KWHT "\x1B[37m" |
#define KYEL "\x1B[33m" |
#define USE_COLORS |
enum logger_type_t |
enum logger_verbose_t |
void logger | ( | logger_verbose_t | verboselevel, |
logger_type_t | logtype, | ||
const char * | format, | ||
... | |||
) |
prints the message to stdout and formats it
verboselevel | minimum verbose level for output |
logtype | type of logmessage for coloring |
format | printf formatted string |
void logger | ( | logger_verbose_t | verboselevel, |
const char * | format, | ||
... | |||
) |
prints the message to stdout
verboselevel | minimum verbose level for output |
format | printf formatted string |
void logger_error | ( | const char * | format, |
... | |||
) |
Outputs the printf like formatted message to stderr and colorizes it.
format | printf formatted string |
void logger_reset | ( | ) |
Resets the logger to prevent the previous line being overdrawn.
Call after custom printf