-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since: - There was already duplication of formatting stderr/stdout output, which was otherwise going to get worse after #636. - It may also be useful for end users when debugging, to save them having to manually print both stderr and stdout manually. Prep for #482. GUS-W-13966399.
- Loading branch information
Showing
4 changed files
with
24 additions
and
17 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,6 +1,15 @@ | ||
use std::fmt::Display; | ||
|
||
/// Log output from a command. | ||
#[derive(Debug, Default)] | ||
pub struct LogOutput { | ||
pub stdout: String, | ||
pub stderr: String, | ||
} | ||
|
||
impl Display for LogOutput { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
let LogOutput { stdout, stderr } = self; | ||
write!(f, "## stderr:\n\n{stderr}\n## stdout:\n\n{stdout}\n") | ||
} | ||
} |
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