[Mono-list] Diagnostic Messages

Jonathan Pryor jonpryor@vt.edu
26 May 2002 13:29:07 -0400


Interesting idea, but it's been my experience that environment variables
can lead to confusion *if* there isn't an analogous way to invoke that
functionality directly on the command line.

So both a MONO_TRACE environment variable and a --diagnostics argument
might be useful.

 - Jon

On Sun, 2002-05-26 at 13:04, Paolo Molaro wrote:
    On 05/26/02 Jonathan Pryor wrote:
    > 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'
    > classes.
    
    I think the Trace and Debug facilities you want can be easily supported
    with and environment variable: the code will look it up and set the
    filestream where the output should go:
    
    export MONO_TRACE=debug,trace=/dev/null
    
    would mean that debug is enabled (and the output goes to stderr) and
    trace is enabled and the output goes to the file named /dev/null.
    If either debug or trace is not mentioned in the var or if it's not set,
    you get no output. This is a runtime library issue, so there should be
    no switches for it in mono/mint.
    Anyone that wants to submit a patch to implement this?
    
    That said, I don't think the Debug and Trace classes should be used in
    the libraries (certainly not in corlib).
    
    lupus
    
    -- 
    -----------------------------------------------------------------
    lupus@debian.org                                     debian/rules
    lupus@ximian.com                             Monkeys do it better
    
    _______________________________________________
    Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list