From a1b155725f6dfb0e1c012a1754c2cd05818ede34 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 30 Jan 2008 18:47:23 -0700 Subject: [PATCH] log.py: update log.err() to take advantage of current foolscap's log.err --- src/allmydata/util/log.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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) -- 2.45.2