You can't with
message. Having looked at the internals of
message, only the raw char* is given to the function that actually logs the text, all text properties are lost.
You can hack your way around this by writing a function that:
message-log-max let-bound to nil so that it won't log to
manually inserts the propertized string at the end of the messages buffer by let-binding
t in the message buffer.
Here is an implementation:
(defun my-message (format &rest args)
"Acts like `message' but preserves string properties in the *Messages* buffer."
(let ((message-log-max nil))
(apply 'message format args))
(with-current-buffer (get-buffer "*Messages*")
(let ((inhibit-read-only t))
(unless (zerop (current-column)) (insert "\n"))
(insert (apply 'format format args))