Commit 6989bd81 authored by Guido van Rossum's avatar Guido van Rossum

By default, log to stderr. This is much better than no logging by

default.
parent 52d96719
...@@ -109,6 +109,7 @@ class ZEOServer: ...@@ -109,6 +109,7 @@ class ZEOServer:
self.options = options self.options = options
def main(self): def main(self):
self.setup_default_logging()
self.check_socket() self.check_socket()
self.clear_socket() self.clear_socket()
try: try:
...@@ -120,6 +121,17 @@ class ZEOServer: ...@@ -120,6 +121,17 @@ class ZEOServer:
self.close_storages() self.close_storages()
self.clear_socket() self.clear_socket()
def setup_default_logging(self):
if self.options.config_logger is not None:
return
if os.getenv("EVENT_LOG_FILE") is not None:
return
if os.getenv("STUPID_LOG_FILE") is not None:
return
# No log file is configured; default to stderr. The logging
# level can still be controlled by {STUPID,EVENT}_LOG_SEVERITY.
os.environ["EVENT_LOG_FILE"] = ""
def check_socket(self): def check_socket(self):
if self.can_connect(self.options.family, self.options.address): if self.can_connect(self.options.family, self.options.address):
self.options.usage("address %s already in use" % self.options.usage("address %s already in use" %
......
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