Skip to content

Commit 357eb3d

Browse files
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 <file>" for better clarity. Additionally, a message is printed when logging is enabled, improving user awareness. Co-authored-by: charliechiou <[email protected]> Change-Id: I359cb621cf584f149c96226bb183403174880cd9
1 parent 0155c71 commit 357eb3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

console.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,15 @@ static bool do_source(int argc, char *argv[])
370370
static bool do_log(int argc, char *argv[])
371371
{
372372
if (argc < 2) {
373-
report(1, "No log file given");
373+
report(1, "No log file given. Use 'log <file>'.");
374374
return false;
375375
}
376376

377377
bool result = set_logfile(argv[1]);
378378
if (!result)
379379
report(1, "Couldn't open log file '%s'", argv[1]);
380380

381+
printf("Logging enabled: %s\n", argv[1]);
381382
return result;
382383
}
383384

0 commit comments

Comments
 (0)