Skip to content

Instantly share code, notes, and snippets.

@vurtun
Last active June 11, 2018 21:04

Revisions

  1. vurtun revised this gist Jun 11, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion debug_log.c
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    #if defined(LIB_DEBUG) && (LIB_DEBUG >= 2)
    #include <stdio.h>
    #define DEBUG_LOG(l, ...) \
    if (l <= LZ4_DEBUG) { \
    if (l <= LIB_DEBUG) { \
    fprintf(stderr, "%s(L:%d):, __FILE__, __LINE__); \
    fprintf(stderr, __VA_ARGS__); \
    fprintf(stderr, " \n"); \
  2. vurtun revised this gist Jun 10, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions debug_log.c
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    #define LIB_DEBUG 2
    #if defined(LIB_DEBUG) && (LIB_DEBUG >= 2)
    #include <stdio.h>
    #define DEBUG_LOG(l, ...) { \
    #define DEBUG_LOG(l, ...) \
    if (l <= LZ4_DEBUG) { \
    fprintf(stderr, "%s(L:%d):, __FILE__, __LINE__); \
    fprintf(stderr, __VA_ARGS__); \
    fprintf(stderr, " \n"); \
    }}
    }
    #else
    #define DEBUG_LOG(l, ...){} /* disabled */
    #endif
  3. vurtun created this gist Jun 10, 2018.
    12 changes: 12 additions & 0 deletions debug_log.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #define LIB_DEBUG 2
    #if defined(LIB_DEBUG) && (LIB_DEBUG >= 2)
    #include <stdio.h>
    #define DEBUG_LOG(l, ...) { \
    if (l <= LZ4_DEBUG) { \
    fprintf(stderr, "%s(L:%d):, __FILE__, __LINE__); \
    fprintf(stderr, __VA_ARGS__); \
    fprintf(stderr, " \n"); \
    }}
    #else
    #define DEBUG_LOG(l, ...){} /* disabled */
    #endif