+ struct journal_driver *j = journal_driver_cast (driver);
+
+ output_driver_track_current_command (item, &j->command_name);
+
+ if (is_text_item (item))
+ {
+ const struct text_item *text_item = to_text_item (item);
+ enum text_item_type type = text_item_get_type (text_item);
+
+ if (type == TEXT_ITEM_SYNTAX)
+ journal_output (j, text_item_get_text (text_item));
+ }
+ else if (is_message_item (item))
+ {
+ const struct message_item *message_item = to_message_item (item);
+ const struct msg *msg = message_item_get_msg (message_item);
+ char *s = msg_to_string (msg, j->command_name);
+ journal_output (j, s);
+ free (s);
+ }
+}