Mercurial > libervia-pubsub
changeset 213:a321f9300054
Actually log requests if verbose.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Thu, 18 Jun 2009 10:27:11 +0000 |
parents | edabaa535476 |
children | 3c45208678fa |
files | idavoll/error.py idavoll/tap_http.py |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/idavoll/error.py Wed Apr 08 09:07:28 2009 +0000 +++ b/idavoll/error.py Thu Jun 18 10:27:11 2009 +0000 @@ -4,6 +4,10 @@ class Error(Exception): msg = '' + def __init__(self, msg=None): + self.msg = msg or self.msg + + def __str__(self): return self.msg
--- a/idavoll/tap_http.py Wed Apr 08 09:07:28 2009 +0000 +++ b/idavoll/tap_http.py Thu Jun 18 10:27:11 2009 +0000 @@ -68,6 +68,9 @@ root.child_unsubscribe = gateway.RemoteUnsubscribeResource(ss) root.child_items = gateway.RemoteItemsResource(ss) + if config["verbose"]: + root = log.LogWrapperResource(root) + site = server.Site(root) w = internet.TCPServer(int(config['webport']), channel.HTTPFactory(site))