Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
Macros | Enumerations | Variables
armv7/boot/include/debug.h File Reference
#include <printf.h>

Go to the source code of this file.

Macros

#define LOGLEVEL   ERROR
 
#define DEBUG(lvl, fmt, ...)   if (LOGLEVEL >= lvl) { printf("\e[35m%s\e[0m:\e[31m%d\e[0m: " "\e[%dm" fmt "\e[0m", __FILE__, __LINE__, debug_color[lvl], ##__VA_ARGS__);}
 
#define PANIC(fmt, ...)   { DEBUG(ERROR,fmt "\n", ##__VA_ARGS__); for(;;); }
 

Enumerations

enum  loglevel_e { ERROR = 0, WARNING, INFO, TRACE }
 

Variables

static unsigned debug_color []
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   lvl,
  fmt,
  ... 
)    if (LOGLEVEL >= lvl) { printf("\e[35m%s\e[0m:\e[31m%d\e[0m: " "\e[%dm" fmt "\e[0m", __FILE__, __LINE__, debug_color[lvl], ##__VA_ARGS__);}

◆ LOGLEVEL

#define LOGLEVEL   ERROR

◆ PANIC

#define PANIC (   fmt,
  ... 
)    { DEBUG(ERROR,fmt "\n", ##__VA_ARGS__); for(;;); }

Enumeration Type Documentation

◆ loglevel_e

enum loglevel_e
Enumerator
ERROR 
WARNING 
INFO 
TRACE 

Variable Documentation

◆ debug_color

unsigned debug_color[]
static
Initial value:
= {
[ERROR] = 31,
[WARNING] = 33,
[INFO] = 32,
[TRACE] = 36,
}
Definition: armv7/boot/include/debug.h:38
Definition: armv7/boot/include/debug.h:38
Definition: armv7/boot/include/debug.h:38
Definition: armv7/boot/include/debug.h:38