浏览代码

show prettier failure output during link archiving

Nick Sweeting 6 年之前
父节点
当前提交
b1b0c8d1c5
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      archivebox/logs.py

+ 6 - 5
archivebox/logs.py

@@ -190,11 +190,11 @@ def log_archive_method_finished(result: ArchiveResult):
 
 
         # Collect and prefix output lines with indentation
         # Collect and prefix output lines with indentation
         output_lines = [
         output_lines = [
-            '{}Failed:{} {}{}'.format(
-                ANSI['red'],
-                result.output.__class__.__name__.replace('ArchiveError', ''), 
-                result.output,
-                ANSI['reset']
+            '{lightred}Failed:{reset}'.format(**ANSI),
+            '    {reset}{} {red}{}{reset}'.format(
+                result.output.__class__.__name__.replace('ArchiveError', ''),
+                result.output, 
+                **ANSI,
             ),
             ),
             *hints,
             *hints,
             '{}Run to see full output:{}'.format(ANSI['lightred'], ANSI['reset']),
             '{}Run to see full output:{}'.format(ANSI['lightred'], ANSI['reset']),
@@ -206,3 +206,4 @@ def log_archive_method_finished(result: ArchiveResult):
             for line in output_lines
             for line in output_lines
             if line
             if line
         ))
         ))
+        print()