Esempio n. 1
0
_public_ int sd_journal_print(int priority, const char *format, ...) {
        int r;
        va_list ap;

        va_start(ap, format);
        r = sd_journal_printv(priority, format, ap);
        va_end(ap);

        return r;
}
Esempio n. 2
0
int sd_journal_print(int priority, const char *format, ...)
{
	va_list ap;
	int ret;

	va_start(ap, format);
	ret = sd_journal_printv(priority, format, ap);
	va_end(ap);

	return ret;
}
Esempio n. 3
0
int log_print(int verbosity, const char *format, ...) {
    int r = 0;
    va_list ap;
    char *formatwithtid;

    if (verbosity <= maximum_verbosity) {
        va_start(ap, format);
        asprintf(&formatwithtid, "[%s] [tid=%lu] %s", PACKAGE_VERSION, syscall(SYS_gettid), format);
        assert(formatwithtid);
        r = sd_journal_printv(verbosity, formatwithtid, ap);
        free(formatwithtid);
        va_end(ap);
    }

    return r;
}