Am Freitag, 5. August 2011, 19:08:20 schrieben Sie:
> Very nice, Reinhold!
>
> > The loglevel or debuglevel (whichever we choose) then needs to be
> > given as a number, though, like --loglevel=4095
> > (i.e. 00011111111111 in binary). Do you have a better idea to
> > specify different debug areas?
>
> In FreeType, we have the following (as an environment variable only
> since it is a library). From the `DEBUG' documentation file:
>
> FT2_DEBUG
>
> This variable is only used when FreeType is built with
> FT_DEBUG_LEVEL_TRACE defined. It contains a list of component
> level definitions, following this format:
>
> component1:level1 component2:level2 component3:level3 ...
>
> where `componentX' is the name of a tracing component, as defined
> in `fttrace.h', but without the `trace_' prefix. `levelX' is the
> corresponding level to use at runtime.
In SANE we use one env variable per backend. E.g. if you want to set the debug
level for my magicolor scanning backend (and for debugging USB and general DLL
loading), you would simply do something like
export SANE_DEBUG_DLL="15"
export SANE_DEBUG_MAGICOLOR="99999"
export SANE_DEBUG_SANEI_USB="127"
where higher numbers indicate more verbosity.
Of course, this involves env variables, while I would prefer cmd line
arguments. The problem is then that you need a (simple) parser to parse the
given arguments...
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel