hpc / hpc/mpifileutils

mfu_debug_level usage

Open
#463 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
200
Forks
85
Avg merge
3d 21h
Merged PRs (30d)
2

Description

Generally, most tools set mfu_debug_level = MFU_LOG_VERBOSE by default, and have a -q option which sets mfu_debug_level = MFU_LOG_NONE.

But there are several levels defined:
https://github.com/hpc/mpifileutils/blob/05055d2ad2f99291af96cd863ae59dec3d328657/src/common/mfu_util.h#L63-L71

Some tools have a hidden -d option which allows setting a specific level.

  1. It would be useful to be able to pass -q, but still see errors, since MFU_LOG_NONE logs NOTHING.
  2. Maybe we could more generically name mfu_debug_level to mfu_log_level
    • Or something different, since the enum is named mfu_loglevel
  3. Maybe passing -q could just bump the log level down by one, instead of all the way to MFU_LOG_NONE. Then, it could be possible to pass something like -qqq to increasingly decrease the log level.
  4. Along with this, maybe we can change tools from using a default of MFU_LOG_VERBOSE to using a default of MFU_LOG_INFO, since most do have a -v option which at this point doesn't really do anything. Also, most messages printed are MFU_LOG_INFO messages.
  5. To incorporate all of this, we might want to evaluate some of the existing MFU_LOG_INFO messages and possibly change them to MFU_LOG_VERBOSE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/common/mfu_util.h at the mfu_loglevel definitions referenced in the issue, then inspect how the tools handle -q, -d, and -v. The issue contains several possible designs rather than one defined change, so done requires agreeing on logging-level semantics, naming, defaults, and which messages change before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.