Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging macros & Log Level refactor #3014

Open
MelReyCG opened this issue Feb 29, 2024 · 0 comments
Open

Logging macros & Log Level refactor #3014

MelReyCG opened this issue Feb 29, 2024 · 0 comments
Assignees

Comments

@MelReyCG
Copy link
Contributor

MelReyCG commented Feb 29, 2024

To base the work of the #2277 EPIC, we need to :

  • Refactor logging macros and the logger namespace so we have - at least under the hood - a real class,
  • the messages should be all equally aligned with the outputting rank (see below),
  • Refactor the LogLevel, it should be an enum with clear and documented labels (see below),

Refactored log output exemple :

INFO      : well ‘my well (myxml.xml:123)’ is shut
 RANK 170

===================================================
TIMESTEP  : Time: 0s, dt:864s, Cycle: 0
 RANK     0
===================================================

WARNING   : Time-step required will be increased based on state change.
 RANK 1

LogLevel enum proposal :

/// @brief Enumerate the logging levels from the most importants messages to the one that contain the more details.
enum class LogLevel : int16_t
{
  Silent = -1,    // Useful as a globalLogLevel for silencing the logger. shouldn't be used as a message level.
  Important = 0,  // Application level messages (help, almost blocking warnings, application informations & phases)
  Progress = 1,   // Time step attempts, newton loop progress of Solver objects
  Detailed = 2,   // More detailed info and stats that affect progress, e.g. residual norms.
  Trace = 3,      // This is intended as a user-level debugging tool. detailed info trace what each component is
                  // doing. e.g. a line for every part of the assembly process, every boundary condition that's being
                  // applied by a physics solver, etc.
  Debug = 4,      // Information that are only relevant for a developper in a debugging context.
  DebugTrace = 5, // This level is useful to have deeper debugging information (which can be potencially heavy to log).
};
@MelReyCG MelReyCG changed the title Refactor logging macros and the logger namespace so we have - at least under the hood - a real class, the messages should be all equally aligned with the outputting rank (see below), Logging macros refactor Feb 29, 2024
@MelReyCG MelReyCG self-assigned this Feb 29, 2024
@MelReyCG MelReyCG changed the title Logging macros refactor Logging macros & Log Level refactor Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant