From: Brian Warner Date: Thu, 31 Jan 2008 01:47:23 +0000 (-0700) Subject: log.py: update log.err() to take advantage of current foolscap's log.err X-Git-Url: https://git.rkrishnan.org/...?a=commitdiff_plain;h=a1b155725f6dfb0e1c012a1754c2cd05818ede34;p=tahoe-lafs%2Ftahoe-lafs.git log.py: update log.err() to take advantage of current foolscap's log.err --- diff --git a/src/allmydata/util/log.py b/src/allmydata/util/log.py index 7d4d713f..c5faa9b1 100644 --- a/src/allmydata/util/log.py +++ b/src/allmydata/util/log.py @@ -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)