20 #include <avrio/defs.h> 41 # if defined(__DOXYGEN__) 69 #define PDEBUG(fmt,...) 81 #define PINFO(fmt,...) 93 #define PNOTICE(fmt,...) 105 #define PWARNING(fmt,...) 117 #define PERROR(fmt,...) 132 void vLog (
int priority,
const char *format, ...);
146 void vLog_P (
int priority,
const char *format, ...);
210 #define __progname "" 212 #define vLogDaemonize (d) 213 #define bLogIsDaemonized() (0) 214 #define LOG_MASK(p) (1<<((p)&0x07)) 215 #define LOG_UPTO(p) ((LOG_MASK(p) << 1) - 1) 219 #include <avr/pgmspace.h> 222 typedef struct xLog xLog;
230 extern xLog xAvrioLog;
234 #define PERROR(fmt,...) vLog_P (LOG_ERR,PSTR("%s():%d: "fmt),\ 235 __FUNCTION__, __LINE__,##__VA_ARGS__) 238 #define PDEBUG(fmt,...) vLog_P (LOG_DEBUG,PSTR("%s():%d: "fmt),\ 239 __FUNCTION__, __LINE__,##__VA_ARGS__) 240 #define PINFO(fmt,...) vLog_P (LOG_INFO,PSTR("%s():%d: "fmt),\ 241 __FUNCTION__, __LINE__,##__VA_ARGS__) 242 #define PNOTICE(fmt,...) vLog_P (LOG_NOTICE,PSTR("%s():%d: "fmt),\ 243 __FUNCTION__, __LINE__,##__VA_ARGS__) 244 #define PWARNING(fmt,...) vLog_P (LOG_WARNING,PSTR("%s():%d: "fmt),\ 245 __FUNCTION__, __LINE__,##__VA_ARGS__) 247 #define PDEBUG(fmt,...) 248 #define PINFO(fmt,...) vLog_P (LOG_INFO,PSTR(fmt),##__VA_ARGS__) 249 #define PNOTICE(fmt,...) vLog_P (LOG_NOTICE,PSTR(fmt),##__VA_ARGS__) 250 #define PWARNING(fmt,...) vLog_P (LOG_WARNING,PSTR(fmt),##__VA_ARGS__) 254 void vLog (
int priority,
const char *format, ...);
255 void vLog_P (
int priority,
const char *format, ...);
264 xAvrioLog.mask = mask;
271 return xAvrioLog.mask;
278 xAvrioLog.stream = f;
285 return (xAvrioLog.stream) ? xAvrioLog.stream : stderr;
291 #define PWARNING(fmt,...) 292 #define PERROR(fmt,...) 293 #define PINFO(fmt,...) 294 #define PNOTICE(fmt,...) 295 #define PDEBUG(fmt,...) 298 #define vLog(p,fmt,...) 299 #define vLog_P(p,fmt,...) 300 #define sLogPriorityString(p) "Unsupported" 303 #define vLogSetMask(m) 304 #define iLogMask() (-1) 305 #define vLogSetFile(f) 306 #define pxLogFile() (NULL) static void vLogSetMask(int mask)
Fixe le masque des priorités.
static int iLogMask(void)
Lecture du masque des priorités en cours.
static void vLogSetFile(FILE *f)
Modifie le fichier de log.
void vLog_P(int priority, const char *format,...)
Affichage ou écriture d'un message de log, version FLASH.
static FILE * pxLogFile(void)
Fichier de log courant.
void vLog(int priority, const char *format,...)
Affichage ou écriture d'un message de log.
const char * sLogPriorityString(int priority)
Chaîne de caractère correspondant à la priorité