Browse Source

Make logger aware of format string so it gives warnings if format is malformed.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
f1b4fdce81
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      include/logger.hpp

+ 1
- 0
include/logger.hpp View File

@@ -35,6 +35,7 @@ void destroy();
/** Do not use this function directly. Use the macros above.
Thread-safe, meaning messages cannot overlap each other in the log.
*/
__attribute__ ((format(printf, 5, 6)))
void log(Level level, const char* filename, int line, const char* func, const char* format, ...);
/** Returns whether the current log file failed to end properly, due to a possible crash.
Must be called *before* init().


Loading…
Cancel
Save