summaryrefslogtreecommitdiff
path: root/tools/merge_dist.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-11-28 00:00:23 +0100
committerLinus Nordberg <linus@nordu.net>2016-11-28 00:00:23 +0100
commitfd43701eb565f73389029a4f5ee20a1163729aa4 (patch)
treea3b14a00642ba8a98fb1d9eb742f8990324d6f4a /tools/merge_dist.py
parent4e1f11749167c7c79a3fc6a0e146487e7cc1022c (diff)
Dedup log initialisation code.
Diffstat (limited to 'tools/merge_dist.py')
-rwxr-xr-xtools/merge_dist.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/merge_dist.py b/tools/merge_dist.py
index ffddc25..d612600 100755
--- a/tools/merge_dist.py
+++ b/tools/merge_dist.py
@@ -18,7 +18,7 @@ from certtools import timing_point, create_ssl_context
from mergetools import get_curpos, get_logorder, chunks, get_missingentries, \
publish_sth, sendlog, sendentries, parse_args, perm, \
get_frontend_verifiedsize, frontend_verify_entries, \
- waitforfile, flock_ex_or_fail, Status
+ waitforfile, flock_ex_or_fail, Status, loginit
def sendlog_helper(entries, curpos, nodename, nodeaddress, own_key, paths,
statusupdates):
@@ -155,12 +155,7 @@ def main():
lockfile = mergedb + "/.merge_dist.lock"
timestamp = 0
- loglevel = getattr(logging, args.loglevel.upper())
- if args.mergeinterval is None:
- logging.basicConfig(level=loglevel)
- else:
- logging.basicConfig(filename=args.logdir + "/merge_dist.log",
- level=loglevel)
+ loginit(args, "merge_dist.log")
if not flock_ex_or_fail(lockfile):
logging.critical("unable to take lock %s", lockfile)