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.
This commit is contained in:
@@ -725,7 +725,7 @@ void server_driver_message(Server *s, sd_id128_t message_id, const char *format,
|
||||
IOVEC_SET_STRING(iovec[n++], buffer);
|
||||
|
||||
if (!sd_id128_equal(message_id, SD_ID128_NULL)) {
|
||||
snprintf(mid, sizeof(mid), "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(message_id));
|
||||
snprintf(mid, sizeof(mid), MESSAGE_ID(message_id));
|
||||
char_array_0(mid);
|
||||
IOVEC_SET_STRING(iovec[n++], mid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user