static void vlogMessages(void) { vlogMessage(LOG_LEVEL_ERROR, "%s", "Error message"); vlogMessage(LOG_LEVEL_WARNING, "%s", "Warning"); vlogMessage(LOG_LEVEL_NOTICE, "%s", "Notice"); vlogMessage(LOG_LEVEL_INFO, "%s", "Informational message"); vlogMessage(LOG_LEVEL_DEBUG, "%s", "Debug message"); }
void logMessage(int level, struct __sourceloc where, const char *fmt, ...) { va_list ap; va_start(ap, fmt); vlogMessage(level, where, fmt, ap); va_end(ap); }
static void logRouting (const char *format, ...) { va_list arguments; va_start(arguments, format); vlogMessage(LOG_CATEGORY(CURSOR_ROUTING), format, &arguments); va_end(arguments); }
void logMessage (int level, const char *format, ...) { va_list arguments; va_start(arguments, format); vlogMessage(level, format, &arguments); va_end(arguments); }
void logMessage(int level, struct __sourceloc whence, const char *fmt, ...) { if (level != LOG_LEVEL_SILENT) { va_list ap; va_start(ap, fmt); vlogMessage(level, whence, fmt, ap); va_end(ap); } }