HI All,
I am having an app that needs to display a lot of msgs.
These msgs need to kept ina log.
I have written it as :
D
EBUG =1
if DEBUG:
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s',
filename='x.log',
filemode='w')
def DBG (s):
if DEBUG:
logging.debug(s)
Then whereever i need i tried calling
DBG("xxxxx")
but i am getting error as:
Traceback (most recent call last):
File "C:\Python24\lib\logging\__init__.py", line 712, in emit
self.stream.write(fs % msg)
ValueError: I/O operation on closed file
File "C:\Python24\lib\logging\__init__.py", line 712, in emit
self.stream.write(fs % msg)
ValueError: I/O operation on closed file
Can anyone help me..i am new to python so plz help
--
Regards,
Shine Anne
--
Regards,
Shine Anne
-- http://mail.python.org/mailman/listinfo/python-list