summaryrefslogtreecommitdiff
path: root/src/timedate/timedated.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 02:05:14 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 02:18:46 +0100
commite2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e (patch)
tree874e0dac2d1426e44c3e748734cbb297f3feefa8 /src/timedate/timedated.c
parent6c861f0aeff9449ee1201bb56f89861921e41c45 (diff)
log: fix order of log_unit_struct() to match other logging calls
Also, while we are at it, introduce some syntactic sugar for creating ERRNO= and MESSAGE= structured logging fields.
Diffstat (limited to 'src/timedate/timedated.c')
-rw-r--r--src/timedate/timedated.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index e720227338..4af054e6b0 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -429,9 +429,9 @@ static int method_set_timezone(sd_bus *bus, sd_bus_message *m, void *userdata, s
}
log_struct(LOG_INFO,
- MESSAGE_ID(SD_MESSAGE_TIMEZONE_CHANGE),
+ LOG_MESSAGE_ID(SD_MESSAGE_TIMEZONE_CHANGE),
"TIMEZONE=%s", c->zone,
- "MESSAGE=Changed time zone to '%s'.", c->zone,
+ LOG_MESSAGE("Changed time zone to '%s'.", c->zone),
NULL);
sd_bus_emit_properties_changed(bus, "/org/freedesktop/timedate1", "org.freedesktop.timedate1", "Timezone", NULL);
@@ -581,9 +581,9 @@ static int method_set_time(sd_bus *bus, sd_bus_message *m, void *userdata, sd_bu
clock_set_hwclock(tm);
log_struct(LOG_INFO,
- MESSAGE_ID(SD_MESSAGE_TIME_CHANGE),
+ LOG_MESSAGE_ID(SD_MESSAGE_TIME_CHANGE),
"REALTIME="USEC_FMT, timespec_load(&ts),
- "MESSAGE=Changed local time to %s", ctime(&ts.tv_sec),
+ LOG_MESSAGE("Changed local time to %s", ctime(&ts.tv_sec)),
NULL);
return sd_bus_reply_method_return(m, NULL);