diff --git a/README b/README index c438bc0..b735bca 100644 --- a/README +++ b/README @@ -89,11 +89,11 @@ vasqLoggerDataProcessor is defined by typedef void (*vasqLoggerDataProcessor)(void*, size_t, vasqLogLevel_t, char**, size_t*); When the logger encounters a %x in the format string, it will call the processor (if it isn't NULL) with -user_data as the first argument, an index as the second, and the log level as the third. The index is a 0-up -counter of which %x in the format string is being handled. The fourth and fifth arguments will be pointers -to the destination and remaining size and function as in vasqIncSnprintf. The processor is responsible for -adjusting these two values (recall that the terminator is not included in the calculation). The processor -can write a terminator at the end but it is not necessary. +user_data as the first argument, an index as the second, and the log level as the third. The index will be a +0-up counter of which %x in the format string is being handled. The fourth and fifth arguments will be +pointers to the destination and remaining size and function as in vasqIncSnprintf. The processor is +responsible for adjusting these two values (recall that the terminator is not included in the calculation). +The processor can write a terminator at the end but it is not necessary. Here is an example of creation and use of a logger. diff --git a/source/logger.c b/source/logger.c index 09f996f..3bf3a91 100644 --- a/source/logger.c +++ b/source/logger.c @@ -405,7 +405,7 @@ vasqFork(const vasqLogger *logger, const char *file_name, const char *function_n default: vasqLogStatement(logger, VASQ_LL_DEBUG, file_name, function_name, line_no, - "Child process started (PID = %i)", child); + "Child process started (PID = %li)", (long)child); break; }