24#ifndef TEST_SERVER_LOGS_HELPERS_INCLUDED
25#define TEST_SERVER_LOGS_HELPERS_INCLUDED
37 void write(
const char *format, ...)
39 __attribute__((format(printf, 2, 3)))
48 va_start(args, format);
49 const int len = vsnprintf(msg,
sizeof(msg), format, args);
52 const int bytes = std::min(len, (
int)(
sizeof(msg) - 1));
53 auto written [[maybe_unused]] = fwrite(msg,
sizeof(
char), bytes,
outfile);
Definition: server_logs_helpers.h:33
std::string m_path
Definition: server_logs_helpers.h:59
void write(const char *format,...)
Definition: server_logs_helpers.h:37
FileLogger(const char *filename)
Definition: server_logs_helpers.h:35
static char outfile[FN_REFLEN]
Definition: mysql.cc:231
const std::string FILE("FILE")
const char * filename
Definition: pfs_example_component_population.cc:67
OTELLogLevel
Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity...
Definition: server_telemetry_logs_client_bits.h:43
bool parse_log_level(const char *level, OTELLogLevel &result)
Definition: server_logs_helpers.cc:26
const char * print_log_level(OTELLogLevel severity)
Definition: server_logs_helpers.cc:40