Fixed logs missing a single character when called with skygw_log_write_flush.
This commit is contained in:
@ -1364,12 +1364,12 @@ int skygw_log_write_flush(
|
|||||||
* Find out the length of log string (to be formatted str).
|
* Find out the length of log string (to be formatted str).
|
||||||
*/
|
*/
|
||||||
va_start(valist, str);
|
va_start(valist, str);
|
||||||
len = vsnprintf(NULL, 0, str, valist);
|
len = sizeof(char) * vsnprintf(NULL, 0, str, valist);
|
||||||
va_end(valist);
|
va_end(valist);
|
||||||
/**
|
/**
|
||||||
* Add one for line feed.
|
* Add one for line feed.
|
||||||
*/
|
*/
|
||||||
len += 1;
|
len += sizeof(char);
|
||||||
/**
|
/**
|
||||||
* Write log string to buffer and add to file write list.
|
* Write log string to buffer and add to file write list.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user