From 357eb3d585427c4a658a9de4780bc8b5c04329e5 Mon Sep 17 00:00:00 2001 From: Eric Chou Date: Tue, 11 Mar 2025 03:51:42 +0800 Subject: [PATCH] Improve log command feedback Enhance the "log" command by providing clearer feedback to users. Now, if no log file is specified, the message explicitly suggests using "log " for better clarity. Additionally, a message is printed when logging is enabled, improving user awareness. Co-authored-by: charliechiou Change-Id: I359cb621cf584f149c96226bb183403174880cd9 --- console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/console.c b/console.c index 6ba021467..889732180 100644 --- a/console.c +++ b/console.c @@ -370,7 +370,7 @@ static bool do_source(int argc, char *argv[]) static bool do_log(int argc, char *argv[]) { if (argc < 2) { - report(1, "No log file given"); + report(1, "No log file given. Use 'log '."); return false; } @@ -378,6 +378,7 @@ static bool do_log(int argc, char *argv[]) if (!result) report(1, "Couldn't open log file '%s'", argv[1]); + printf("Logging enabled: %s\n", argv[1]); return result; }