[Mono-list] Diagnostic Messages

Lawrence Pit loz@cable.a2000.nl
Mon, 27 May 2002 21:47:22 +0300

Hi Jonathan,

> Should the `DefaultTraceListener' do nothing, even though diagnostic
> messages have been requested?  I should think not; it should do
> something, otherwise it will look like it isn't working, leading to
> annoyed developers.

In my opinion mono on win32 systems would use OutputDebugString and on *nix
systems this function would simply send its messages to /dev/null. It should
not send it to console, as ms.net doesn't do that as well; you have to
explicitely set that up in that case.

As there's no debugging device on *nix systems, developers couldn't get
annoyed as they couldn't have any expectations in this case. ;-)

> However...what if the program has no application configuration file?
> What is a reasonable default?  Not everyone will know about application
> configuration files, though perhaps they should.  This is where I
> believe a ``--diagnostics'' parameter to mono/mint would be useful: you
> could enable/disable the output of diagnostic messages without needing
> to create a configuration file.

I can understand that, though instead of --diagnostics=trace I would
say --trace=/dev/console or --trace=/dev/stdout
or --trace=/home/me/myfile.log, etc. Same for debugging messages, allow a
user the choice of the file or device to send the output to, instead of only
having the option to have it send to stdout.