From 1ca6783f5ea3755bd83e723f529c2eda512c7fed Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 8 Oct 2012 17:02:30 +0000 Subject: log: introduce a macro to format message id The MESSAGE_ID=... stanza will appear in countless number of places. It is just too long to write it out in full each time. Incidentally, this also fixes a typo of MESSSAGE is three places. --- src/timedate/timedated.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/timedate') diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 8c589ba30e..40ba255090 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -701,7 +701,7 @@ static DBusHandlerResult timedate_message_handler( } log_struct(LOG_INFO, - "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_TIMEZONE_CHANGE), + MESSAGE_ID(SD_MESSAGE_TIMEZONE_CHANGE), "TIMEZONE=%s", tz.zone, "MESSAGE=Changed timezone to '%s'.", tz.zone, NULL); @@ -843,7 +843,7 @@ static DBusHandlerResult timedate_message_handler( hwclock_set_time(tm); log_struct(LOG_INFO, - "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_TIME_CHANGE), + MESSAGE_ID(SD_MESSAGE_TIME_CHANGE), "REALTIME=%llu", (unsigned long long) timespec_load(&ts), "MESSAGE=Changed local time to %s", ctime(&ts.tv_sec), NULL); -- cgit v1.2.3-54-g00ecf