llnl / llnl/scr

Request to direct SCR log messages to stderr or a custom file descriptor

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

Nobody has claimed this yet.

Dominant language
C
Stars
108
Forks
37
PR merge metrics
No merged PRs in 30d

Description

When running with SCR_DEBUG=1, SCR prints log messages to stdout. It would be useful at times to direct those messages to other files like stderr or perhaps a user-provided file descriptor. This would enable users to more easily filter SCR messages from their job logs.

The related code in SCR is in scr_err_mpi.c and scr_err_serial.c, e.g.:

https://github.com/LLNL/scr/blob/48328f6c1a0fdb5a3187bd4c38d0caac587442a8/src/scr_err_mpi.c#L52-L63

There are a few other places where SCR calls print functions of other components, like:
https://github.com/LLNL/scr/blob/48328f6c1a0fdb5a3187bd4c38d0caac587442a8/src/scr.c#L1278-L1289

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 by reading the referenced logging code in src/scr_err_mpi.c and src/scr_err_serial.c, then inspect the print calls in src/scr.c around lines 1278-1289. Determine how SCR should select stderr or a user-provided file descriptor while preserving current SCR_DEBUG behavior. Done means SCR debug messages can be directed away from stdout as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.