On Mon, Oct 26, 2009 at 5:41 PM, Anand Balachandran Pillai <abpil...@gmail.com> wrote: [..] > Now, the log() method under Test above is under log.py and uses the > logging module of python with the following format specifications. When we > print the e under log, what i wanted is the information trace pertaining to > Method.py like where actually the line no,filename and module name > information under method.py to be printed. Currently,iam not getting what i > wanted.
If this is what you want, the logging call should be inside Method.py. You should publish (as part of your API), the logging class which calling applications can modify (add/remove handlers etc.) so that they can get desired behaviour. It would be a bug if you made a logging call inside Test.py and it said that it was being called from Method.py OTOH, if you explicitly want the details of which module/class etc. of the callee, you can get it from the stack frame. -- ~noufal http://nibrahim.net.in _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers