diff --git a/.vscode/settings.json b/.vscode/settings.json index 73f7711..5f2a4bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "files.autoSave": "onFocusChange", "editor.fontSize": 14, - "editor.fontFamily": "'Source Code Pro', 'Source Code Pro', monospace", - "terminal.integrated.fontFamily": "Source Code Pro", + "editor.fontFamily": "'FiraCode Nerd Font Mono', 'FiraCode Nerd Font Mono', 'FiraCode Nerd Font Mono'", + "terminal.integrated.fontFamily": "FiraCode Nerd Font Mono", "editor.fontLigatures": true, //"C_Cpp.default.configurationProvider": "tboox.xmake-vscode", "cmake.configureOnOpen": true, @@ -151,7 +151,8 @@ "hash_map": "cpp", "stdfloat": "cpp", "unordered_set": "cpp", - "cfenv": "cpp" + "cfenv": "cpp", + "cassert": "cpp" }, "makefile.configureOnOpen": false, "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools" diff --git a/client/client.cpp b/client/client.cpp index 39cfb18..b702999 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -66,7 +66,8 @@ void CClient::run(const std::string& ip, const std::string& port) delete bf; TLOGI(log_, "version: {}", VERSION_NUM); TLOGI(log_, "opensource: {}", VERSION_URL); - TLOGW(log_, "SupportCmd:Get|Up|Down|Cancel|Update"); + TLOGW(log_, "SupportCmd ==>"); + TLOGW(log_, "Get|Up|Down|Cancel|Update|Who|Where"); fc_append('|'); while (1) { @@ -87,6 +88,14 @@ void CClient::run(const std::string& ip, const std::string& port) std::this_thread::sleep_for(std::chrono::milliseconds(10)); break; } + if (cmd_input == "who" || cmd_input == "Who") { + TLOGD(log_, "ID => {}", own_id_); + continue; + } + if (cmd_input == "Where" || cmd_input == "where") { + TLOGD(log_, "At => {}", COfPath::to_full(".")); + continue; + } if (cmd_input == "Get" || cmd_input == "get") { get_task_list(); continue; @@ -534,7 +543,7 @@ void CClient::handle_frame(CFrameBuffer* buf) } switch (buf->type_) { case TYPE_GET_ID: { - TLOGD(log_, "Your ID:{}", buf->tid_); + TLOGD(log_, "ID => {}", buf->tid_); own_id_ = buf->tid_; break; } @@ -576,8 +585,13 @@ void CClient::handle_frame(CFrameBuffer* buf) task_list_[index]->id = id; } if (num < 20) { - TLOGD(log_, "*****************************************"); - TLOGI(log_, "{}", real); + TLOGD(log_, "============================================"); + if (id == own_id_) { + TLOGI(log_, "@{}", real); + + } else { + TLOGI(log_, "{}", real); + } } } } diff --git a/util/util.cpp b/util/util.cpp index 99b6c14..282ea9a 100644 --- a/util/util.cpp +++ b/util/util.cpp @@ -132,7 +132,7 @@ CFrameBuffer::~CFrameBuffer() Log_t get_logger(const std::string& mark) { auto console_sink = std::make_shared(); - console_sink->set_pattern("%^[%Y-%m-%d %H:%M:%S.%e]: %v%$"); + console_sink->set_pattern("%^[%m-%d %H:%M:%S.%e]: %v%$"); auto logger = std::make_shared(mark, console_sink); logger->set_level(spdlog::level::debug); spdlog::register_logger(logger);