473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

stdlib doc for logger.findCaller() needs update.

The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

findCaller()
Finds the caller's source filename and line number. Returns the
filename and line number as a 2-element tuple.

[jnair@sunazaki python]$ python
Python 2.4.4 (#1, Feb 2 2007, 17:43:17)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import logging
logging.basicConfig()
logger = logging.getLogger()
help(logger.findCaller)
Help on method findCaller in module logging:

findCaller(self) method of logging.RootLogger instance
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
>>logger.findCaller()
('<stdin>', 1, '?')
>>>
May 23 '07 #1
4 1850
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.
I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.

Vinay Sajip

May 25 '07 #2
Vinay Sajip wrote:
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
>The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
May 25 '07 #3
Vinay Sajip wrote:
On May 23, 12:05 pm, jitu...@hotmail.com wrote:
>The logger objects findCaller() method is returning a "3" element
tuple instead of "2" two as
documented in the 2.4.4 Python Library Reference .DocString is showing
it correctly.

I've updated the docs - the next 2.4.x release should have them.
Thanks for the report.
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

May 25 '07 #4
On May 25, 12:27 pm, Steve Holden <s...@holdenweb.comwrote:
>
Is a further 2.4 release planned?

I'd have thought that unless a security issue appears the answer is
likely to be "no".
You never know - and it didn't take long to commit the change to
release24-maint, so why not?!

Regards,

Vinay

May 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nermin Brgulja | last post by:
Hi, I am using jdk1.4 Logger with a FileHandler for logging in a web application, and have two questions regarding logging: The first question is: I've created an Logger and mapped it to an...
0
by: Laszlo | last post by:
Hi I need a GL::Logger wich implements Class::Singleton to be a singleton and Log::Log4perl to can log amy message into a file. Here is the module source:...
2
by: Robert | last post by:
Hi all I have been trying to set up a framework with logging implemented using the built in Python logging module. For better or worse, I have decided to base the logger names on the module...
10
by: Gary Jefferson | last post by:
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger =...
5
by: CedricCicada | last post by:
Greetings! I want to write messages into the Windows event log. I found sevicemanager, but the source is always "Python Service", and I'd like to be a bit more descriptive. Poking around on...
4
by: garyjefferson123 | last post by:
Suppose I have some sort of context variable that I want to appear in log messages. E.g.: logger = logging.getLogger("somelogger") class SomeOp: def __init__(self, ctx): self.ctx = ctx def...
1
by: nagk9 | last post by:
Hi , I am using log4j in my application. I have the problem with log4j.properties file . It will automatically appends another logger file from the current logger which i am using for the...
1
by: Matimus | last post by:
Yes but in the other hand :http://docs.python.org/library/logging.html#logger-objects That is part of the power of the logging module. If you ask for a logger of the same name in two different...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.