重构:改进各种模块中的日志记录和错误处理
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "widget/panel_widget/mbox.h"
|
||||
|
||||
#include "utf8.h"
|
||||
#include "misc/log_util.h"
|
||||
#include "widget/leaf_widget/meditable_text_box.h"
|
||||
#include "widget/panel_widget/moverlay.h"
|
||||
|
||||
@@ -35,11 +36,11 @@ void test_color() {
|
||||
|
||||
for (const char* test_str: test_cases) {
|
||||
std::optional<linear_color> color = linear_color::from_string(test_str);
|
||||
std::println(std::cout, "Parsing '{}': ", test_str);
|
||||
log_info("Parsing '{}': ", test_str);
|
||||
if (color) {
|
||||
std::println(std::cout, "Success -> r:{}, g:{}, b:{}, a:{}", color->r, color->g, color->b, color->a);
|
||||
log_info("Success -> r:{}, g:{}, b:{}, a:{}", color->r, color->g, color->b, color->a);
|
||||
}
|
||||
else { std::println(std::cerr, "Failed to parse color string: {}", test_str); }
|
||||
else { log_info("Failed to parse color string: {}", test_str); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user