summaryrefslogtreecommitdiff
path: root/tools/mergetools.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mergetools.py')
-rw-r--r--tools/mergetools.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/mergetools.py b/tools/mergetools.py
index 1334186..109e9d4 100644
--- a/tools/mergetools.py
+++ b/tools/mergetools.py
@@ -489,6 +489,15 @@ def terminate_child_procs():
#print >>sys.stderr, "DEBUG: terminating pid", p.pid
p.terminate()
+def loginit(args, fname):
+ logfmt = '%(asctime)s %(message)s'
+ loglevel = getattr(logging, args.loglevel.upper())
+ if args.logdir is None:
+ logging.basicConfig(format=logfmt, level=loglevel)
+ else:
+ logging.basicConfig(format=logfmt, level=loglevel,
+ filename=args.logdir + "/" + fname)
+
class Status:
def __init__(self, path):
self.path = path