diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-01-26 22:43:29 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-01-26 22:43:29 +0300 |
commit | 43d153c00bb067276d3cda141ad62de27cb4971d (patch) | |
tree | bc878c5a9a306d1ce9aba8adc5a8eb000d2afa23 /include/log.h | |
parent | efd8f03262f5cfeedbf2bef0f05636088b39d679 (diff) | |
download | revela-d2d93f1c9c615b60772e560a05fde594863f8e21.tar.gz revela-d2d93f1c9c615b60772e560a05fde594863f8e21.zip |
Cleanup & fix new album images not being renderedv0.1.3
* Cleaned up some code and formatted with clang-format
* Fix the result of what can only be explained as me having a
brain-fart^1 leading me to write returns where they shouldn't be hence
the image-walk loop returning early when new images were added to an
album.
* Also cleaned up and fixed a bug in roscha; more in roscha's own repo.
1: https://www.youtube.com/watch?v=UN7SBXJj2pc
Diffstat (limited to 'include/log.h')
-rw-r--r-- | include/log.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/log.h b/include/log.h index 2be35ee..c4a2430 100644 --- a/include/log.h +++ b/include/log.h @@ -29,27 +29,27 @@ void log_set_verbosity(enum log_level); void log_printf(enum log_level, const char *restrict fmt, ...); #ifdef DEBUG -#define log_print(v, fmt, ...) \ +#define log_print(v, fmt, ...) \ log_printf(v, "[%s] %s:%d " fmt, log_level_names[v], \ - __FILE__, __LINE__, ##__VA_ARGS__) + __FILE__, __LINE__, ##__VA_ARGS__) #else #define log_print(v, fmt, ...) \ log_printf(v, fmt, ##__VA_ARGS__) #endif #ifdef DEBUG -#define log_printl(v, fmt, ...) \ +#define log_printl(v, fmt, ...) \ log_printf(v, "[%s] %s:%d " fmt "\n", log_level_names[v], \ - __FILE__, __LINE__, ##__VA_ARGS__) + __FILE__, __LINE__, ##__VA_ARGS__) #else #define log_printl(v, fmt, ...) \ log_printf(v, fmt "\n", ##__VA_ARGS__) #endif #ifdef DEBUG -#define log_printl_errno(v, fmt, ...) \ +#define log_printl_errno(v, fmt, ...) \ log_printf(v, "[%s] %s:%d " fmt ": %s\n", log_level_names[v], \ - __FILE__, __LINE__, ##__VA_ARGS__, strerror(errno)) + __FILE__, __LINE__, ##__VA_ARGS__, strerror(errno)) #else #define log_printl_errno(v, fmt, ...) \ log_printf(v, fmt ": %s\n", ##__VA_ARGS__, strerror(errno)) |