-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from conan.api.output import Color, ConanOutput | ||
|
||
class RunnerOutput(ConanOutput): | ||
def __init__(self, hostname: str): | ||
def __init__(self, runner_info: str): | ||
super().__init__() | ||
self.set_warnings_as_errors(True) # Make log errors blocker | ||
self._prefix = f"{hostname} | " | ||
self._prefix = f"{runner_info} | " | ||
|
||
def _write_message(self, msg, fg=None, bg=None, newline=True): | ||
super()._write_message(self._prefix, Color.BLACK, Color.BRIGHT_YELLOW, newline=False) | ||
super()._write_message(msg, fg, bg, newline) | ||
for line in msg.splitlines(): | ||
super()._write_message(self._prefix, Color.BLACK, Color.BRIGHT_YELLOW, newline=False) | ||
super()._write_message(line, fg, bg, newline) | ||
|
||
@property | ||
def padding(self): | ||
return len(self._prefix) + 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters