2008/6/20 Dan Price <[EMAIL PROTECTED]>:
>
> I set out to do something about the useless verbose output you get when
> you do an image-update.  However I quickly realized that there might be
> two problems here: we need a user-friendly verbose output, and we might
> want to have some less user-friendly debug output.  I'm still formulating
> what to do about verbose output.
>
> But I got further with the debug output.  The idea I had is mostly about
> enabling us to debug problems encountered by end users.  If it was also
> a developer productivity tool that would be a bonus.
>
> So to start, I've moved some of the verbose output into a debug mode,
> which one can activate either by setting PKG_DEBUG or with --debug.  I've
> also left room in the api to direct the debug output to a file.  In
> addition, I've added in some debug output; my hope is that we can get
> users to submit debug output when reporting problems, as a way to help us
> more rapidly diagnose issues when the traceback is insufficient.
>
> To make a debug call, you do this:
>
>        from pkg.misc import debug
>        debug("something")
>
> To initialize debugging, you do this:
>
>        from pkg.misc import debug_init
>        debug_init(sys.stderr, "DEBUG")
>
> Thoughts, Opinions?  I tried to be super-lightweight and super-simple, but
> would be open to a linker style debug architecture (where you'd set
> PKG_DEBUG=a,b,c -- see LD_DEBUG in ld.so.1(1)).
...
> Your comments appreciated,

Gives me the sudden urge to add DTrace probes to our Python code :-)

In general, I like the approach.

It also fits with the direction I'm trying to go with the depot server
logging as well (allowing a fairly flexible definition of output
destination).

-- 
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to