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_backup.py | |
parent | 4e1f11749167c7c79a3fc6a0e146487e7cc1022c (diff) |
Dedup log initialisation code.
Diffstat (limited to 'tools/merge_backup.py')
-rwxr-xr-x | tools/merge_backup.py | 7 |
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) |