# How can I specify text to be included in the pdflatex output log during compilation.

I would like to be able to have some kind of logging command that is able to log text to the default pdflatex logfile (<input-base-filename>.log). Is this possible, and if so, how?

In particular, I'd like to be able to use this command inside the document (i.e. between \begin{document} and \end{document}).

-
welcome to tex.sx. Note that you can use back-ticks  to mark inline code. Then you don't need to handle < > any special as well. –  Martin Scharrer Feb 28 '11 at 13:21

You can use \wlog{<log text line>} to write a text line to the log. It will not appear in the console output but only in the log file.

If you want to write text to the log file and the console output you can use
\typeout{<log text line>}.

-
\documentclass{article}

\begin{document}

foo
\typeout{===This appears in the log and the terminal===}%
\wlog{===This only in the log file===}%
bar

\end{document}
`
-