[Patches] [ python-Patches-1001864 ] Logger file objects
SourceForge.net
noreply at sourceforge.net
Tue Aug 10 17:49:48 CEST 2004
Patches item #1001864, was opened at 2004-08-02 08:35
Message generated for change (Comment added) made by vsajip
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1001864&group_id=5470
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Miki Tebeka (tebeka)
Assigned to: Vinay Sajip (vsajip)
Summary: Logger file objects
Initial Comment:
The logger can return a file like object for each error
level.
These file objects can be sent to any function
expecting a file object.
Example:
>> import logging
>> logging.basicConfig()
>> logger = logging.getLogger()
>> err = logger.getFileObject(logging.ERROR)
>> print >> err, "This is an error"
ERROR:root:This is an error
ERROR:root:
>> err.flush()
>> err.close()
----------------------------------------------------------------------
>Comment By: Vinay Sajip (vsajip)
Date: 2004-08-10 15:49
Message:
Logged In: YES
user_id=308438
Nice, but I have a question about isatty. Is it needed?
According to the docs for file-like objects, it should not
be implemented unless associated with a real file or device.
----------------------------------------------------------------------
Comment By: Miki Tebeka (tebeka)
Date: 2004-08-09 12:47
Message:
Logged In: YES
user_id=358087
Hope it works now...
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter)
Date: 2004-08-09 10:03
Message:
Logged In: YES
user_id=29957
There's no uploaded file! You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.
Please try again.
(This is a SourceForge annoyance that we can do
nothing about. :-( )
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter)
Date: 2004-08-09 10:03
Message:
Logged In: YES
user_id=29957
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1001864&group_id=5470
More information about the Patches
mailing list