[debexpo-devel] All you logs are belong to us
Jonny Lamb
jonnylamb at jonnylamb.com
Sun Jun 15 15:21:19 CEST 2008
On Sun, Jun 15, 2008 at 09:36:21AM +0200, Christoph Haas wrote:
> Well, I tend to spam my code with logging statements. Especially in parts
> that get run in batch mode (unattended in the background). It's nice to
> set the debug level to DEBUG and see what happens under the hood. Like
> sometimes I had trouble with certain version strings that contained an
> epoch. And in such a case it's nice to see where the importer choked.
I don't see a big difference in having a different logging level as one
can easily tell the logger to log a lower level (and above), but on
thinking about it, DEBUG is probably a more accurate level and I have no
reason to keep it on what it is at the moment, so I will go with your
request! Check out [0].
0. http://debexpo.workaround.org/trac/changeset/0e7d7ec
> I was just suggesting to add logging already. You have already put
> docstrings into your functions in methods. And I just wanted to ask you to
> put logging lines into the code as you go. I'm roughly following what you
> check in. But it would be nice to get an understanding of what the
> importer does in what order and where it fails (if it does).
Sure thing! I will bear this in mind when writing code now.
> Logging has also helped me write tests in the past because I could try to
> import several deliberately broken packages and see how the importer
> reacted on them.
Setting up test cases for the importer is on my todo list. It will be
great and will be lovely once it's there, but it'll be so tiresome to
actually write it! I'll do it soon though. I don't like the idea of
changing something and accidentally breaking the importer without
noticing.
> Whether all that goes into the same logfile or into seperate log files... I
> don't know.
I think for the importer, separate log files would be the most useful.
I'll look into adding this to the ini file.
Thanks,
--
Jonny Lamb, UK jonnylamb at jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://workaround.org/pipermail/debexpo-devel/attachments/20080615/6429899a/attachment.pgp
More information about the debexpo-devel
mailing list