$Messages
$Messages gives the list of files and pipes to which message output is sent.
Output from Message is always given on the $Messages channel. See The Mathematica Book: Section 2.13.1.
Further Examples