Skip to content

Commit 037de7f

Browse files
committed
The parser CLI logs now show the right file making the call
Fixes #17 Signed-off-by: Pedro Algarvio <[email protected]>
1 parent 8e032b7 commit 037de7f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

changelog/17.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The parser CLI logs now show the right file making the call

src/ptscripts/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,25 @@ def debug(self, *args):
112112
"""
113113
Print debug message to stderr.
114114
"""
115-
self.console.log(*args, style="log-debug")
115+
self.console.log(*args, style="log-debug", _stack_offset=2)
116116

117117
def info(self, *args):
118118
"""
119119
Print info message to stderr.
120120
"""
121-
self.console.log(*args, style="log-info")
121+
self.console.log(*args, style="log-info", _stack_offset=2)
122122

123123
def warn(self, *args):
124124
"""
125125
Print warning message to stderr.
126126
"""
127-
self.console.log(*args, style="log-warning")
127+
self.console.log(*args, style="log-warning", _stack_offset=2)
128128

129129
def error(self, *args):
130130
"""
131131
Print error message to stderr.
132132
"""
133-
self.console.log(*args, style="log-error")
133+
self.console.log(*args, style="log-error", _stack_offset=2)
134134

135135
def exit(self, status=0, message=None):
136136
"""

0 commit comments

Comments
 (0)