Commit 433d4365 authored by Jens Vagelpohl's avatar Jens Vagelpohl

- The changeover from zLOG to the logging module means that some

  tools need to perform minimal logging configuration themselves. Changed
  the zeoup script to do so and thus enable it to emit error messages.
parent cc3c62d5
...@@ -13,6 +13,13 @@ PersistentMapping ...@@ -13,6 +13,13 @@ PersistentMapping
- (3.4.3b1) The ``PersistentMapping`` makes changes by a ``pop()`` method call - (3.4.3b1) The ``PersistentMapping`` makes changes by a ``pop()`` method call
persistent now. persistent now.
Tools
-----
- (3.4.3b1) The changeover from zLOG to the logging module means that some
tools need to perform minimal logging configuration themselves. Changed
the zeoup script to do so and thus enable it to emit error messages.
What's new in ZODB3 3.4.2? What's new in ZODB3 3.4.2?
========================== ==========================
......
...@@ -27,6 +27,7 @@ You must specify either -p and -h or -U. ...@@ -27,6 +27,7 @@ You must specify either -p and -h or -U.
""" """
import getopt import getopt
import logging
import socket import socket
import sys import sys
import time import time
...@@ -41,6 +42,18 @@ from ZEO.ClientStorage import ClientStorage ...@@ -41,6 +42,18 @@ from ZEO.ClientStorage import ClientStorage
ZEO_VERSION = 2 ZEO_VERSION = 2
def setup_logging():
# Set up logging to stderr which will show messages originating
# at severity ERROR or higher.
root = logging.getLogger()
root.setLevel(logging.ERROR)
fmt = logging.Formatter(
"------\n%(asctime)s %(levelname)s %(name)s %(message)s",
"%Y-%m-%dT%H:%M:%S")
handler = logging.StreamHandler()
handler.setFormatter(fmt)
root.addHandler(handler)
def check_server(addr, storage, write): def check_server(addr, storage, write):
t0 = time.time() t0 = time.time()
if ZEO_VERSION == 2: if ZEO_VERSION == 2:
...@@ -122,6 +135,7 @@ def main(): ...@@ -122,6 +135,7 @@ def main():
usage() usage()
addr = host, port addr = host, port
setup_logging()
check_server(addr, storage, write) check_server(addr, storage, write)
if __name__ == "__main__": if __name__ == "__main__":
......
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