Skip to content

Commit

Permalink
fix: properly expoe multiple LOG_ macros in public API.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Nov 14, 2022
1 parent ddbc14b commit 36817cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/public.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

/** Log Macros **/

#define LOG_DEBUG 'D'
#define LOG_INFO 'I'
#define LOG_WARN 'W'

#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)

#define DEBUG(msg, ...) log_message(__FILENAME__, __LINE__, LOG_DEBUG, msg, ##__VA_ARGS__)
Expand Down
1 change: 0 additions & 1 deletion src/utils/log.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <sys/file.h>
#include <sys/stat.h>
#include "commons.h"
#include "utils.h"

static void log_bl_smooth(bl_smooth_t *smooth, const char *prefix);
Expand Down
4 changes: 1 addition & 3 deletions src/utils/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

#include <setjmp.h>

#define LOG_DEBUG 'D'
#define LOG_INFO 'I'
#define LOG_WARN 'W'
/* Internal; not exposed through public API */
#define LOG_ERR 'E'
#define LOG_PLOT 'P'

Expand Down

0 comments on commit 36817cf

Please sign in to comment.