On Jan 6, 4:17 pm, Kottiyath <n.kottiy...@gmail.com> wrote: > I dont want the whole traceback. I just wanted to know where the log > was generated from i.e. which procedure and which line. I have 3/4 > points in many procedures where I encounter a small error (not an > exception) and want to log it. So having individual names for each > looks to be somewhat verbose - esp since the application is >10K LOC. >
Don't the funcName and lineno arguments in the format string work for you? (See http://docs.python.org/library/logging.html#id1) Regards, Vinay Sajip -- http://mail.python.org/mailman/listinfo/python-list