static void systemd_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) { DISABLE_WARNING_FORMAT_NONLITERAL; log_metav(priority, file, line, fn, format, args); REENABLE_WARNING; }
/* Any time an access gets denied this callback will be called code copied from dbus. If audit is turned on the messages will go as user_avc's into the /var/log/audit/audit.log, otherwise they will be sent to syslog. */ static int log_callback(int type, const char *fmt, ...) { va_list ap; va_start(ap, fmt); #ifdef HAVE_AUDIT if (get_audit_fd() >= 0) { _cleanup_free_ char *buf = NULL; int r; r = vasprintf(&buf, fmt, ap); va_end(ap); if (r >= 0) { audit_log_user_avc_message(get_audit_fd(), AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0); return 0; } va_start(ap, fmt); } #endif log_metav(LOG_USER | LOG_INFO, __FILE__, __LINE__, __FUNCTION__, fmt, ap); va_end(ap); return 0; }
void microhttpd_logger(void *arg, const char *fmt, va_list ap) { _cleanup_free_ char *f; if (asprintf(&f, "microhttpd: %s", fmt) <= 0) { log_oom(); return; } log_metav(LOG_INFO, NULL, 0, NULL, f, ap); }
int log_meta( int level, const char*file, int line, const char *func, const char *format, ...) { int r; va_list ap; va_start(ap, format); r = log_metav(level, file, line, func, format, ap); va_end(ap); return r; }
/* Any time an access gets denied this callback will be called code copied from dbus. If audit is turned on the messages will go as user_avc's into the /var/log/audit/audit.log, otherwise they will be sent to syslog. */ static int log_callback(int type, const char *fmt, ...) { va_list ap; va_start(ap, fmt); #ifdef HAVE_AUDIT if (get_audit_fd() >= 0) { char buf[LINE_MAX]; vsnprintf(buf, sizeof(buf), fmt, ap); audit_log_user_avc_message(get_audit_fd(), AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0); va_end(ap); return 0; } #endif log_metav(LOG_USER | LOG_INFO, __FILE__, __LINE__, __FUNCTION__, fmt, ap); va_end(ap); return 0; }
void udev_main_log(struct udev *udev, int priority, const char *file, int line, const char *fn, const char *format, va_list args) { log_metav(priority, file, line, fn, format, args); }
static void systemd_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) { log_metav(priority, file, line, fn, format, args); }