[Zope-Checkins] CVS: Zope/lib/python/ZConfig/components/logger -
loghandler.py:1.2
Fred L. Drake, Jr.
fred at zope.com
Tue Apr 13 13:05:52 EDT 2004
Update of /cvs-repository/Zope/lib/python/ZConfig/components/logger
In directory cvs.zope.org:/tmp/cvs-serv10541
Modified Files:
loghandler.py
Log Message:
make sure we absolutize stored pathnames so we can reopen the same
filename even when someone does an os.chdir()
=== Zope/lib/python/ZConfig/components/logger/loghandler.py 1.1 => 1.2 ===
--- Zope/lib/python/ZConfig/components/logger/loghandler.py:1.1 Fri Jan 2 13:46:12 2004
+++ Zope/lib/python/ZConfig/components/logger/loghandler.py Tue Apr 13 13:05:52 2004
@@ -13,6 +13,7 @@
"""Handlers which can plug into a PEP 282 logger."""
+import os.path
import sys
from logging import Handler, StreamHandler
@@ -29,6 +30,7 @@
"""
def __init__(self, filename, mode="a"):
+ filename = os.path.abspath(filename)
StreamHandler.__init__(self, open(filename, mode))
self.baseFilename = filename
self.mode = mode
More information about the Zope-Checkins
mailing list