From d9aaf0b186481203de0928e35fba634806e303b6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sat, 12 Nov 2011 13:54:40 +0000 Subject: [PATCH] fixed logging --- src/lib/log.c | 9 --------- src/lib/log.h | 1 - src/ui_notify.c | 10 ++++++---- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/lib/log.c b/src/lib/log.c index 6018b54..2de7037 100644 --- a/src/lib/log.c +++ b/src/lib/log.c @@ -101,12 +101,3 @@ void log_printf(int lvl, const char *fmt, ...) fprintf(stdf, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer); } } - -void log_debug(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - log_printf(LOG_ERR, fmt, ap); - va_end(ap); -} diff --git a/src/lib/log.h b/src/lib/log.h index 38efb3e..cf4fcd3 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -30,7 +30,6 @@ enum log_level { void log_open(const char *path); void log_printf(int lvl, const char *fmt, ...); -void log_debug(const char *fmt, ...); void log_close(); diff --git a/src/ui_notify.c b/src/ui_notify.c index 9422e63..cf0da1a 100644 --- a/src/ui_notify.c +++ b/src/ui_notify.c @@ -39,8 +39,9 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui) char *name; NotifyNotification *notif; - log_debug("ui_notify() last_notification %d", - last_notification_tv.tv_sec); + log_printf(LOG_DEBUG, + "ui_notify() last_notification %d", + last_notification_tv.tv_sec); if (gettimeofday(&t, NULL) != 0) { log_printf(LOG_ERR, _("gettimeofday failed")); @@ -72,8 +73,9 @@ void ui_notify(struct psensor *sensor, struct ui_psensor *ui) NULL, GTK_WIDGET(ui->main_window)); #endif - log_debug("ui_notify() notif_notification_new %s", - sensor->name); + log_printf(LOG_DEBUG, + "ui_notify() notif_notification_new %s", + sensor->name); notify_notification_show(notif, NULL); -- 2.7.4