"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libhfcommon/log.h" between
honggfuzz-2.1.tar.gz and honggfuzz-2.2.tar.gz

About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.

log.h  (honggfuzz-2.1):log.h  (honggfuzz-2.2)
skipping to change at line 31 skipping to change at line 31
#ifndef _HF_COMMON_LOG_H_ #ifndef _HF_COMMON_LOG_H_
#define _HF_COMMON_LOG_H_ #define _HF_COMMON_LOG_H_
#include <pthread.h> #include <pthread.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
enum llevel_t { FATAL = 0, ERROR, WARNING, INFO, DEBUG, HELP, HELP_BOLD }; enum llevel_t { FATAL = 0, ERROR, WARNING, INFO, DEBUG, HELP, HELP_BOLD };
extern enum llevel_t log_level; extern enum llevel_t hf_log_level;
#define LOG_HELP(...) logLog(HELP, __FUNCTION__, __LINE__, false, __VA_ARGS__); #define LOG_HELP(...) logLog(HELP, __FUNCTION__, __LINE__, false, __VA_ARGS__);
#define LOG_HELP_BOLD(...) logLog(HELP_BOLD, __FUNCTION__, __LINE__, false, __VA _ARGS__); #define LOG_HELP_BOLD(...) logLog(HELP_BOLD, __FUNCTION__, __LINE__, false, __VA _ARGS__);
#define LOG_D(...) \ #define LOG_D(...) \
if (log_level >= DEBUG) { \ if (hf_log_level >= DEBUG) { \
logLog(DEBUG, __FUNCTION__, __LINE__, false, __VA_ARGS__); \ logLog(DEBUG, __FUNCTION__, __LINE__, false, __VA_ARGS__); \
} }
#define LOG_I(...) \ #define LOG_I(...) \
if (log_level >= INFO) { \ if (hf_log_level >= INFO) { \
logLog(INFO, __FUNCTION__, __LINE__, false, __VA_ARGS__); \ logLog(INFO, __FUNCTION__, __LINE__, false, __VA_ARGS__); \
} }
#define LOG_W(...) \ #define LOG_W(...) \
if (log_level >= WARNING) { \ if (hf_log_level >= WARNING) { \
logLog(WARNING, __FUNCTION__, __LINE__, false, __VA_ARGS__); \ logLog(WARNING, __FUNCTION__, __LINE__, false, __VA_ARGS__); \
} }
#define LOG_E(...) \ #define LOG_E(...) \
if (log_level >= ERROR) { \ if (hf_log_level >= ERROR) { \
logLog(ERROR, __FUNCTION__, __LINE__, false, __VA_ARGS__); \ logLog(ERROR, __FUNCTION__, __LINE__, false, __VA_ARGS__); \
} }
#define LOG_F(...) \ #define LOG_F(...) \
logLog(FATAL, __FUNCTION__, __LINE__, false, __VA_ARGS__); \ logLog(FATAL, __FUNCTION__, __LINE__, false, __VA_ARGS__); \
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
#define PLOG_D(...) \ #define PLOG_D(...) \
if (log_level >= DEBUG) { \ if (hf_log_level >= DEBUG) { \
logLog(DEBUG, __FUNCTION__, __LINE__, true, __VA_ARGS__); \ logLog(DEBUG, __FUNCTION__, __LINE__, true, __VA_ARGS__); \
} }
#define PLOG_I(...) \ #define PLOG_I(...) \
if (log_level >= INFO) { \ if (hf_log_level >= INFO) { \
logLog(INFO, __FUNCTION__, __LINE__, true, __VA_ARGS__); \ logLog(INFO, __FUNCTION__, __LINE__, true, __VA_ARGS__); \
} }
#define PLOG_W(...) \ #define PLOG_W(...) \
if (log_level >= WARNING) { \ if (hf_log_level >= WARNING) { \
logLog(WARNING, __FUNCTION__, __LINE__, true, __VA_ARGS__); \ logLog(WARNING, __FUNCTION__, __LINE__, true, __VA_ARGS__); \
} }
#define PLOG_E(...) \ #define PLOG_E(...) \
if (log_level >= ERROR) { \ if (hf_log_level >= ERROR) { \
logLog(ERROR, __FUNCTION__, __LINE__, true, __VA_ARGS__); \ logLog(ERROR, __FUNCTION__, __LINE__, true, __VA_ARGS__); \
} }
#define PLOG_F(...) \ #define PLOG_F(...) \
logLog(FATAL, __FUNCTION__, __LINE__, true, __VA_ARGS__); \ logLog(FATAL, __FUNCTION__, __LINE__, true, __VA_ARGS__); \
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
extern void logInitLogFile(const char* logfile, int fd, enum llevel_t ll); extern void logInitLogFile(const char* logfile, int fd, enum llevel_t ll);
extern void logLog(enum llevel_t ll, const char* fn, int ln, bool perr, const ch ar* fmt, ...) extern void logLog(enum llevel_t ll, const char* fn, int ln, bool perr, const ch ar* fmt, ...)
__attribute__((format(printf, 5, 6))); __attribute__((format(printf, 5, 6)));
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)