From 67aca5f5bc86673a59ccbadc5ec3c3e4984b52a0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 3 Feb 2011 20:26:37 +0000 Subject: Only log basename. --- tracing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tracing.py b/tracing.py index 85f1a54..191564f 100644 --- a/tracing.py +++ b/tracing.py @@ -44,6 +44,7 @@ substring checking only, no globbing or regexps, sorry. import logging +import os import traceback @@ -62,6 +63,7 @@ def trace(msg): if trace_patterns: frames = traceback.extract_stack(limit=2) filename, lineno, funcname, text = frames[0] + filename = os.path.basename(filename) for pattern in trace_patterns: if pattern in filename: logging.debug('%s:%s:%s: %s' % -- cgit v1.2.1