[debexpo-devel] All you logs are belong to us
Christoph Haas
email at christoph-haas.de
Sun Jun 15 09:36:21 CEST 2008
On Sonntag, 15. Juni 2008, Jonny Lamb wrote:
> These logs on current mentors look very useful. Can I just clarify
> exactly what you're for though as I'm not very sure what you mean.
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.
Usually a debugger might help. But with web applications it's not easy to
attach to a process to debug. So extensive logging has often helped me
track down stupid little problems afterwards. But I don't think I have to
preach about the usefulness of logging. :) Although I hated Python's
logging module for quite a while because the config file style of defining
loggers and handlers is just plain evil and in half of the cases hasn't
done what I wanted or threw cryptic errors.
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).
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.
Whether all that goes into the same logfile or into seperate log files... I
don't know.
Cheers
Christoph
--
When you do things right people won't be sure you've done anything at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://workaround.org/pipermail/debexpo-devel/attachments/20080615/54ca6c0f/attachment.pgp
More information about the debexpo-devel
mailing list