Flash Translation Layer  1.0
Macros
log.h File Reference
#include <stdio.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STRINGIFY(x)   #x
 
#define TOSTRING(x)   STRINGIFY(x)
 
#define pr_debug(...)   (void)0
 
#define pr_info(fmt, ...)
 
#define pr_warn(fmt, ...)
 
#define pr_err(fmt, ...)
 

Macro Definition Documentation

◆ pr_debug

#define pr_debug (   ...)    (void)0

◆ pr_err

#define pr_err (   fmt,
  ... 
)
Value:
fprintf(stderr, \
"ERROR:[" __FILE__ ":%s(" TOSTRING(__LINE__) ")] " fmt, \
__func__, ##__VA_ARGS__)
#define TOSTRING(x)
Definition: log.h:11

◆ pr_info

#define pr_info (   fmt,
  ... 
)
Value:
fprintf(stdout, "INFO:[" __FILE__ ":%s(" TOSTRING(__LINE__) ")] " fmt, \
__func__, ##__VA_ARGS__)
#define TOSTRING(x)
Definition: log.h:11

◆ pr_warn

#define pr_warn (   fmt,
  ... 
)
Value:
fprintf(stderr, \
"WARNING:[" __FILE__ ":%s(" TOSTRING(__LINE__) ")] " fmt, \
__func__, ##__VA_ARGS__)
#define TOSTRING(x)
Definition: log.h:11

◆ STRINGIFY

#define STRINGIFY (   x)    #x

◆ TOSTRING

#define TOSTRING (   x)    STRINGIFY(x)