From fd43701eb565f73389029a4f5ee20a1163729aa4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 28 Nov 2016 00:00:23 +0100 Subject: Dedup log initialisation code. --- tools/merge_fetch.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tools/merge_fetch.py') diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py index d5a514b..801f9cf 100755 --- a/tools/merge_fetch.py +++ b/tools/merge_fetch.py @@ -20,7 +20,7 @@ from itertools import cycle from mergetools import get_logorder, verify_entry, get_new_entries, \ chunks, fsync_logorder, get_entries, add_to_logorder, \ hexencode, hexdecode, parse_args, perm, flock_ex_or_fail, Status, \ - terminate_child_procs + terminate_child_procs, loginit from certtools import timing_point, write_file, create_ssl_context def merge_fetch_sequenced(args, config, localconfig): @@ -297,12 +297,7 @@ def main(): currentsizefile = mergedb + "/fetched" lockfile = mergedb + "/.merge_fetch.lock" - loglevel = getattr(logging, args.loglevel.upper()) - if args.mergeinterval is None: - logging.basicConfig(level=loglevel) - else: - logging.basicConfig(filename=args.logdir + "/merge_fetch.log", - level=loglevel) + loginit(args, "merge_fetch.log") if not flock_ex_or_fail(lockfile): logging.critical("unable to take lock %s", lockfile) -- cgit v1.1