blob: b7b4a5e941db903fb4b83a66c49d8a64c7d375a1 [file] [log] [blame]
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdarg.h>
#include "fio.h"
int log_info(const char *format, ...)
{
char buffer[1024];
va_list args;
size_t len;
va_start(args, format);
len = vsnprintf(buffer, sizeof(buffer), format, args);
va_end(args);
if (is_backend)
return fio_server_text_output(buffer, len);
else
return fwrite(buffer, len, 1, f_out);
}
int log_err(const char *format, ...)
{
char buffer[1024];
va_list args;
size_t len;
va_start(args, format);
len = vsnprintf(buffer, sizeof(buffer), format, args);
va_end(args);
if (is_backend)
return fio_server_text_output(buffer, len);
else
return fwrite(buffer, len, 1, f_err);
}