[Mono-devel-list] Re: [Mono-list] Patch for selective logging

Jerome Laban jlaban at wanadoo.fr
Tue Mar 4 17:18:03 EST 2003


Here is the new one,

> We should not expose magic numbers to the user (and I'm sure I won't be
> able to remember the values myself and I'd have to lookup them each time
> in the header file and do the math...).
>
> --log-mask should accept something like:
> --log-mask=all
> or
> --log-mask=gc,dll
>

Done, plus the same syntax for the env vars.

> There is no need to have init/cleanup functions: make the mono-logger.c
> code lazily init stuff as needed.

Ok, I removed the init function. I left the cleanup function to free the
stack needed by push/pop methods. But it is not mandatory to call it.

> Why this extra function?
> void
> mono_trace_set (GLogLevelFlags level, MonoTraceMask mask);
>
> There are already two functions to set the level and mask.

Removed.

> The push/pop functions look also like overdesign to me, but I guess you
> can leave them there if someone finds a need for them someday.

Kind of a reflex :) I needed it a lot in a previous project...

> The GC-related stuff should go into metadata/gc.c instead
> (guarded by the usual #if HAVE_BOEHM_GC checks).

Moved :) GC stuff is far better there yes.

I've also updated the manpage for mono. (doc police is watching us :)) )

Jerome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono-logger.h
Type: application/octet-stream
Size: 2127 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030304/f5d704cb/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono-logger.c
Type: application/octet-stream
Size: 4872 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030304/f5d704cb/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log-20030304.diff
Type: application/octet-stream
Size: 11670 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030304/f5d704cb/attachment-0002.obj 


More information about the Mono-devel-list mailing list