Обновление

This commit is contained in:
cfif 2026-02-10 15:22:34 +03:00
parent f36a5af4ab
commit 9341315919
1 changed files with 14 additions and 2 deletions

View File

@ -22,6 +22,7 @@ static int cvt_f(double number, int prec, int sharpflag, unsigned char *negp,
unsigned char fmtch, unsigned char *startp, unsigned char *endp);
#endif
/*
int stream_logger_vprintf(tLoggerInterface *logger, char const *fmt, va_list ap) {
//#define PUTC(c) { putchar(stream,(unsigned char)(c)); ++retval; }
@ -760,10 +761,21 @@ void LoggerPrintf(
va_list args;
va_start(args, fmt);
result = vsprintf(str, fmt, args);
result = vsnprintf(str, sizeof(str), fmt, args);
va_end(args);
logger->logging(logger->env, authorStatic, authorLen, loglevel, str, result, complete);
// va_start(args, fmt);
// result = vsprintf(str, fmt, args);
// va_end(args);
if (result > 0) {
logger->logging(logger->env, authorStatic, authorLen, loglevel, str, result, complete);
} else {
str[0] = 0;
strcat(str, "Error LOG");
logger->logging(logger->env, authorStatic, authorLen, loglevel, str, sizeof("Error LOG") - 1, complete);
}
}
#ifdef TEST