Browse Source

Fix logging macro to add \n after each log message

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Joachim Nilsson 6 years ago
parent
commit
d784b15a7f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/helpers.h

+ 1
- 1
src/helpers.h View File

27
 
27
 
28
 #define LIGHT_LOG(lvl, fp, fmt, args...)				\
28
 #define LIGHT_LOG(lvl, fp, fmt, args...)				\
29
 	if (light_loglevel >= lvl)					\
29
 	if (light_loglevel >= lvl)					\
30
-		fprintf(fp, "%s:%d:" fmt, __FILE__, __LINE__, ##args)
30
+		fprintf(fp, "%s:%d:" fmt "\n", __FILE__, __LINE__, ##args)
31
 
31
 
32
 #define LIGHT_NOTE(fmt, args...) LIGHT_LOG(LIGHT_NOTE_LEVEL,  stdout, "NOTE:" fmt, ##args)
32
 #define LIGHT_NOTE(fmt, args...) LIGHT_LOG(LIGHT_NOTE_LEVEL,  stdout, "NOTE:" fmt, ##args)
33
 #define LIGHT_WARN(fmt, args...) LIGHT_LOG(LIGHT_WARN_LEVEL,  stderr, "WARN:" fmt, ##args)
33
 #define LIGHT_WARN(fmt, args...) LIGHT_LOG(LIGHT_WARN_LEVEL,  stderr, "WARN:" fmt, ##args)