Skip to content

Commit a2694a8

Browse files
committed
The filename on console logs is now only shown when debug output is enabled.
Fixes #18 Signed-off-by: Pedro Algarvio <[email protected]>
1 parent 32ceca2 commit a2694a8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changelog/18.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The filename on console logs is now only shown when debug output is enabled.

src/ptscripts/parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def __init__(self, parser: Parser):
9797
if os.environ.get("CI"):
9898
console_kwargs["force_terminal"] = True
9999
console_kwargs["force_interactive"] = False
100-
self.console = Console(stderr=True, **console_kwargs)
101-
self.console_stdout = Console(**console_kwargs)
100+
self.console = Console(stderr=True, log_path=False, **console_kwargs)
101+
self.console_stdout = Console(log_path=False, **console_kwargs)
102102
rich.reconfigure(stderr=True, **console_kwargs)
103103
self.venv = None
104104

@@ -329,6 +329,8 @@ def parse_args(self):
329329
logging.root.setLevel(logging.CRITICAL + 1)
330330
elif options.debug:
331331
logging.root.setLevel(logging.DEBUG)
332+
self.context.console.log_path = True
333+
self.context.console_stdout.log_path = True
332334
else:
333335
logging.root.setLevel(logging.INFO)
334336
if options.timestamps:

0 commit comments

Comments
 (0)