diff piecrust/commands/builtin/publishing.py @ 954:d709429f02eb

publish: Add more options for logging, better feedback when it fails.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 05 Oct 2017 21:30:25 -0700
parents 13e8b50a2113
children
line wrap: on
line diff
--- a/piecrust/commands/builtin/publishing.py	Thu Oct 05 20:36:05 2017 -0700
+++ b/piecrust/commands/builtin/publishing.py	Thu Oct 05 21:30:25 2017 -0700
@@ -19,6 +19,14 @@
             metavar='LOG_FILE',
             help="Log the publisher's output to a given file.")
         parser.add_argument(
+            '--log-debug-info',
+            action='store_true',
+            help="Add some debug info as a preamble to the log file.")
+        parser.add_argument(
+            '--append-log',
+            action='store_true',
+            help="Append to the log file if it exists.")
+        parser.add_argument(
             '--preview',
             action='store_true',
             help="Only preview what the publisher would do.")
@@ -62,5 +70,7 @@
             ctx.args.target,
             preview=ctx.args.preview,
             extra_args=ctx.args,
-            log_file=ctx.args.log_publisher)
+            log_file=ctx.args.log_publisher,
+            log_debug_info=ctx.args.log_debug_info,
+            append_log_file=ctx.args.append_log)