use different colors for sent and received commands

This commit is contained in:
Martin Michelsen
2022-04-03 23:35:11 -07:00
parent be69f26af5
commit 028078925d
6 changed files with 30 additions and 6 deletions
+8 -1
View File
@@ -19,7 +19,8 @@ using namespace std;
static FileContentsCache file_cache;
extern bool use_terminal_colors;
extern FileContentsCache file_cache;
@@ -88,9 +89,15 @@ void send_command(
if (name_str[0]) {
name_token = string(" to ") + name_str;
}
if (use_terminal_colors) {
print_color_escape(stderr, TerminalFormat::FG_YELLOW, TerminalFormat::BOLD, TerminalFormat::END);
}
log(INFO, "Sending%s (version=%d command=%04hX flag=%08X)",
name_token.c_str(), static_cast<int>(version), command, flag);
print_data(stderr, send_data.data(), send_data.size());
if (use_terminal_colors) {
print_color_escape(stderr, TerminalFormat::NORMAL, TerminalFormat::END);
}
}
if (crypt) {