summaryrefslogtreecommitdiff
path: root/tools/merge_backup.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_backup.py
parent4e1f11749167c7c79a3fc6a0e146487e7cc1022c (diff)
Dedup log initialisation code.
Diffstat (limited to 'tools/merge_backup.py')
-rwxr-xr-xtools/merge_backup.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/merge_backup.py b/tools/merge_backup.py
index c057b5a..b0c7289 100755
--- a/tools/merge_backup.py
+++ b/tools/merge_backup.py
@@ -229,12 +229,7 @@ def main():
lockfile = mergedb + "/.merge_backup.lock"
fetched_path = mergedb + "/fetched"
- loglevel = getattr(logging, args.loglevel.upper())
- if args.mergeinterval is None:
- logging.basicConfig(level=loglevel)
- else:
- logging.basicConfig(filename=args.logdir + "/merge_backup.log",
- level=loglevel)
+ loginit(args, "merge_backup.log")
if not flock_ex_or_fail(lockfile):
logging.critical("unable to take lock %s", lockfile)