From b1c353f9ee838891cfba6c53f97b6171f59c5fcb Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 11 Feb 2015 10:07:19 -0500 Subject: Add logging capability --- htc_utils/CLI/batch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htc_utils/CLI/batch.py b/htc_utils/CLI/batch.py index efd9099..3a40b5a 100644 --- a/htc_utils/CLI/batch.py +++ b/htc_utils/CLI/batch.py @@ -30,6 +30,7 @@ parser.add_argument('--stdout', action='store_true', help='Output job to stdout parser.add_argument('-q', '--queue', action='store', default='', help='Queue main job N times') parser.add_argument('-b', '--subqueue', action='store', default='', help='Queue sub-job N tims') parser.add_argument('-s', '--subarg', action='append') +parser.add_argument('--logging', action='store', default='logs') # Sort by key, then by value sorted_args = sorted(nulljob.config.items(), key=lambda record: record[0], reverse=False) @@ -62,6 +63,9 @@ for key, value in vars(args).items(): continue job.attr(key, value) +if args.logging: + job.logging(args.logging, create=True) + # Manually assign important variables job.attr('executable', args.executable) job.attr('arguments', args.args) -- cgit