Skip to content

Commit

Permalink
Merge pull request #562 from ChinYikMing/make-log-quiet
Browse files Browse the repository at this point in the history
Suppress logging outputs to honor -q option
  • Loading branch information
jserv authored Feb 10, 2025
2 parents d1ed003 + 3a68696 commit c9dfd36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ int main(int argc, char **args)
attr.data.user.elf_program = opt_prog_name;
#endif

/* enable or disable the logging outputs */
rv_log_set_quiet(opt_quiet_outputs);

/* create the RISC-V runtime */
rv = rv_create(&attr);
if (!rv) {
Expand Down
3 changes: 0 additions & 3 deletions src/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@ riscv_t *rv_create(riscv_user_t rv_attr)
rv_log_set_level(attr->log_level);
rv_log_info("Log level: %s", rv_log_level_string(attr->log_level));

/* enable the log */
rv_log_set_quiet(false);

#if !RV32_HAS(SYSTEM) || (RV32_HAS(SYSTEM) && RV32_HAS(ELF_LOADER))
elf_t *elf = elf_new();
assert(elf);
Expand Down

0 comments on commit c9dfd36

Please sign in to comment.