Commit be1cf6a3 authored by Fred Drake's avatar Fred Drake

Egads! Logging configuration is painful, especially when two packages

think they're allowed to do it.  For now, just let zLOG initialize
everything; we can figure out the right way to make zLOG and logging
co-habitate later.
parent 59f5fef1
...@@ -603,12 +603,21 @@ def main(module_filter, test_filter, libdir): ...@@ -603,12 +603,21 @@ def main(module_filter, test_filter, libdir):
if not keepStaleBytecode: if not keepStaleBytecode:
os.path.walk(os.curdir, remove_stale_bytecode, None) os.path.walk(os.curdir, remove_stale_bytecode, None)
configure_logging() # Skip this; zLOG will eventually win, and coordinating
# initialization is a loosing battle.
#configure_logging()
# Initialize the path and cwd # Initialize the path and cwd
global pathinit global pathinit
pathinit = PathInit(build, build_inplace, libdir) pathinit = PathInit(build, build_inplace, libdir)
# We need to make sure zLOG takes its turn at initializing the
# logging package before we start calling any logging methods, so
# we don't find that it changes at some arbitrary time in the
# future.
import zLOG
zLOG.initialize()
files = find_tests(module_filter) files = find_tests(module_filter)
files.sort() files.sort()
...@@ -658,6 +667,15 @@ def configure_logging(): ...@@ -658,6 +667,15 @@ def configure_logging():
# it than using environment variables. # it than using environment variables.
os.environ["LOGINI"] = logini os.environ["LOGINI"] = logini
# Re-write the filenames in the environment so they don't wander
# when specified as relative paths and we os.chdir().
if os.environ.has_key("STUPID_LOG_FILE"):
os.environ["STUPID_LOG_FILE"] = os.path.abspath(
os.environ["STUPID_LOG_FILE"])
if os.environ.has_key("EVENT_LOG_FILE"):
os.environ["EVENT_LOG_FILE"] = os.path.abspath(
os.environ["EVENT_LOG_FILE"])
def process_args(argv=None): def process_args(argv=None):
import getopt import getopt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment