gives the list of files and pipes to which message output is sent.
$Messages
gives the list of files and pipes to which message output is sent.
Examples
Basic Examples (2)
The default channel for messages is standard output:
$MessagesHave messages go to a temporary file and the default channel:
stream = OpenWrite[]$Messages = Append[$Messages, stream]1 / 0Show the contents of the temporary file:
FilePrint[stream[[1]]]Clean up by resetting $Messages to its default and closing the stream:
$Messages = $Messages[[{1}]];
Close[stream];Tech Notes
Related Workflows
- Suppress Error Messages
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), $Messages, Wolfram Language function, https://reference.wolfram.com/language/ref/$Messages.html.
CMS
Wolfram Language. 1988. "$Messages." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$Messages.html.
APA
Wolfram Language. (1988). $Messages. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$Messages.html
BibTeX
@misc{reference.wolfram_2026_$messages, author="Wolfram Research", title="{$Messages}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/$Messages.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$messages, organization={Wolfram Research}, title={$Messages}, year={1988}, url={https://reference.wolfram.com/language/ref/$Messages.html}, note=[Accessed: 13-June-2026]}