diff options
author | Linus Nordberg <linus@nordu.net> | 2016-11-28 00:00:23 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-11-28 00:00:23 +0100 |
commit | fd43701eb565f73389029a4f5ee20a1163729aa4 (patch) | |
tree | a3b14a00642ba8a98fb1d9eb742f8990324d6f4a /tools/merge_fetch.py | |
parent | 4e1f11749167c7c79a3fc6a0e146487e7cc1022c (diff) |
Dedup log initialisation code.
Diffstat (limited to 'tools/merge_fetch.py')
-rwxr-xr-x | tools/merge_fetch.py | 9 |
1 files changed, 2 insertions, 7 deletions
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) |