[darcs-devel] Logging

David Roundy droundy at darcs.net
Mon Sep 11 10:14:35 PDT 2006


On Sun, Sep 10, 2006 at 04:12:28PM -0700, Jason Dagit wrote:
> Hello,
> 
> I was working on the darcs source today and I realized that in a lot
> of ways the current logging output is poor.  Mostly we don't have
> enough of it.
> 
> Here are some changes I started making:
> 
> 1) In DarcsFlags change Verbose | Quiet to Verbose Int.  The
> understanding would be that Verbose 0 == Quiet, Verbose 3 == standard
> verbosity and Verbose 9 == Highest verbosity.  On the commandline
> --verbose would be equivalent to -v3.

I'd rather avoid putting an Int into verbose, as in my experience this
makes it hard to keep consistent levels of verbosity than otherwise.
I'd go with something more like

data Verbosity = Quiet | Verbose | Debug

and then we could add more levels when we add more constructors if we
ever want more fine-grained logging.  But I imagine that just adding a
--debug level will be sufficient for your goals.
-- 
David Roundy




More information about the darcs-devel mailing list