RPi: Log refactor

This commit is contained in:
Marcelo Aquino
2016-10-18 16:55:47 -02:00
parent 75aad5de35
commit 2be804a1ef
13 changed files with 196 additions and 80 deletions
+16 -3
View File
@@ -2,14 +2,27 @@
#define LOG_H
#include <stdarg.h>
#include <syslog.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void mys_log_v(int level, const char *fmt, va_list args);
extern void mys_log(int level, const char *fmt, ...) __attribute__((format(printf,2,3)));
extern void logOpen(int options, int facility);
extern void vlogInfo(const char *fmt, va_list args);
extern void logInfo(const char *fmt, ...) __attribute__((format(printf,1,2)));
extern void vlogError(const char *fmt, va_list args);
extern void logError(const char *fmt, ...) __attribute__((format(printf,1,2)));
extern void vlogNotice(const char *fmt, va_list args);
extern void logNotice(const char *fmt, ...) __attribute__((format(printf,1,2)));
extern void vlogDebug(const char *fmt, va_list args);
extern void logDebug(const char *fmt, ...) __attribute__((format(printf,1,2)));
extern void vlogWarning(const char *fmt, va_list args);
extern void logWarning(const char *fmt, ...) __attribute__((format(printf,1,2)));
#ifdef __cplusplus
}