[Mono-list] Diagnostic Messages

Jonathan Pryor jonpryor@vt.edu
26 May 2002 12:37:45 -0400

If `syslog' were to be used, what would you suggest for the facility? 
`LOG_USER' might make sense, using `LOG_DEBUG' for Debug-generated
messages and `LOG_WARNING' or `LOG_INFO' for Trace-generated messages.

The one downside with using `syslog' is that you wouldn't see the
messages from inside GDB when debugging under GDB.  You would instead
need to have a different terminal open to view the contents of the
system logfile.  (At least, the only way I currently know to view the
output of `syslog' is to `tail -f /var/log/message' as root, which is
undesirable for multi-user installations.)

So I'm not sure if `syslog' is a better solution.  However, I don't know
much about `syslog' either, so I'm interested in hearing more.  However,
it seems that `System.Diagnostics.EventLog' and related classes would
probably be a closer fit to `syslog' than the `Trace' and `Debug'

 - Jon

On Sun, 2002-05-26 at 11:03, Paul Trunley wrote:
    On Sunday 26 May 2002 06:17 am, Jonathan Pryor wrote:
    > Apparently some clarification is in order.
    > On Windows, the `DefaultTraceListener' uses `OutputDebugString' to print
    > messages.  This ensures that no messages will be displayed on the
    > console unless an additional `TraceListener' is added that sends output
    > to the console.  This is a rather nice feature, in that I can leave
    > trace messages in the program without having them be seen by the user.
    > Linux/Unix, as far as I can tell, has no equivalent to
    > `OutputDebugString'.  The console must be used instead (until someone
    > tells me a better way to do it).
    BSDs (and perhaps Linux, I don't know) have the syslog facility, that is 
    probably the most appropriate equivalent.