Movatterモバイル変換


[0]ホーム

URL:


[Python-ideas] Efficient debug logging

Chris Angelicorosuav at gmail.com
Wed Feb 15 06:48:59 EST 2017


On Wed, Feb 15, 2017 at 10:47 PM, Barry Scott <barry at barrys-emacs.org> wrote:> __repr__ is interesting however.>> Typically I describe in a string why the value is being logged. That means> that the object is always a string. I cannot recall using debugLog( obj )> in production.>> dlog('This is the state of obj at the start of event processing: %r' % (obj,))Right. I would have no hesitation whatsoever in dumping out a crucialstate object, even if it means writing a custom (and expensive) reprfunction for it. It's clean, simple, and immensely helpful indebugging.ChrisA


More information about the Python-ideasmailing list

[8]ページ先頭

©2009-2026 Movatter.jp