Skip to content

Commit 0be3e83

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: I355f3f13bd959ddecc2893d202642accc565fb8a
1 parent 0155c71 commit 0be3e83

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-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

eric.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
No log file given. Use 'log <file>'.
2+
Freeing queue

0 commit comments

Comments
 (0)