# How use \typeout argument with backslash in message?

How does one include a command name, including its backslash, in the message issued by a \typeout command?

For example, I want to issue the message >>> Using \cmd to the log. How must the following be modified to do it?

\documentclass{article}
\typeout{>>> Using \cmd.}
\begin{document}
Hello.
\end{document

• \string\cmd or \protect\cmd depending on space Jul 14 '19 at 15:11
• That did it, thanks. Jul 14 '19 at 15:49

\string\cmd or \protect\cmd depending on space requirements.