]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
log.py: update log.err() to take advantage of current foolscap's log.err
authorBrian Warner <warner@allmydata.com>
Thu, 31 Jan 2008 01:47:23 +0000 (18:47 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 31 Jan 2008 01:47:23 +0000 (18:47 -0700)
src/allmydata/util/log.py

index 7d4d713f7493fb3f496b735617505a24b58595da..c5faa9b1b87e6c3c2c0cb3cfad6d3cf5e4316aaf 100644 (file)
@@ -1,6 +1,5 @@
 
 from foolscap.logging import log
-from twisted.python import failure
 
 NOISY = log.NOISY # 10
 OPERATIONAL = log.OPERATIONAL # 20
@@ -14,10 +13,8 @@ BAD = log.BAD # 40
 
 msg = log.msg
 
-def err(f=None, **kwargs):
-    if not f:
-        f = failure.Failure()
-    kwargs['failure'] = f
+def err(*args, **kwargs):
+    # this should probably be in foolscap
     if 'level' not in kwargs:
         kwargs['level'] = log.UNUSUAL
-    return log.msg("failure", **kwargs)
+    return log.err(*args, **kwargs)