Output debug info
Hi, is there a way to output my own debug info to console like I can with System.out.println() in Java? TIA Frank
Frank Stephan wrote:
is there a way to output my own debug info to console like I can with System.out.println() in Java?
in python products you can use 'print', but that's 'bad' in production code. Much more safely: from zLOG import LOG,INFO LOG('an identifier', INFO, 'Your message here', error = sys.exc_info()) The error bit is optional but is very cool when catching exceptions since it causes the traceback to be logged :-) cheers, Chris
On Tue, Sep 11, 2001 at 10:40:47AM +0100, Chris Withers wrote:
Frank Stephan wrote:
is there a way to output my own debug info to console like I can with System.out.println() in Java?
in python products you can use 'print', but that's 'bad' in production code.
Very, very bad. It doesn't bite you until you do something like start or restart zope from a remote ssh session, then log out. At some point in the near future, that product will start randomly failing with IO Errors. It won't happen to people who only run their machines from the local console (like the developers of said product often do). -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (3)
-
Chris Withers -
Frank Stephan -
Mike Renfro