Skip to content

refactor: cleanup logInfo #3755

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

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

refactor: cleanup logInfo #3755

wants to merge 21 commits into from

Conversation

paveltomin
Copy link
Contributor

No description provided.

arng40

This comment was marked as duplicate.

Copy link
Contributor

@arng40 arng40 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was clearly needed, thanks !

{
static constexpr int getMinLogLevel() { return 1; }
static constexpr std::string_view getDescription()
{
return "Output the loaded/computed table data in the log if succinct enough,"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why all the sentence has been simplified, it contained useful information for the user

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this specific one was simply wrong, no? nothing to do with csv output which is controlled by a different flag

@paveltomin paveltomin added the flag: requires rebaseline Requires rebaseline branch in integratedTests label Aug 5, 2025
@paveltomin
Copy link
Contributor Author

rebaseline is needed
no real diffs: INFO: No unfiltered differences were found.
but diffs like that:

********************************************************************************
Error: /Problem/FieldSpecifications/initialComposition_C10
	Group has a child 'logLevel' in the baseline file but not the file to compare.
********************************************************************************

@paveltomin paveltomin removed the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Aug 6, 2025
@paveltomin paveltomin requested a review from Copilot August 15, 2025 20:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the logging infrastructure throughout the GEOS codebase by consolidating and standardizing logInfo structures across different modules. The primary purpose is to cleanup and simplify the logging system by removing duplicate and redundant log level definitions, reorganizing them into more coherent categories, and establishing a cleaner hierarchy.

  • Consolidates various logInfo structures into more general categories (e.g., LinearSolverConfigurationLinearSolver, BoundaryConditionBoundaryConditions)
  • Removes redundant and module-specific log level definitions in favor of centralized ones
  • Updates all logging calls throughout the codebase to use the new consolidated log level names

Reviewed Changes

Copilot reviewed 89 out of 89 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
LogLevelsInfo.hpp files Consolidates and standardizes log level definitions across modules
Physics solver files Updates log level registrations and calls to use new consolidated names
Output files Removes specialized timer categories in favor of centralized approach
Input files Removes explicit logLevel attributes from field specifications
CMakeLists.txt Removes deleted LogLevelsInfo.hpp file references

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 344 to 345
!isClone && m_writeCSV,
!isClone && m_writeInLog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of removing the struct members (as C++17 don't have the named struct initializers)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted, i misunderstood the meaning, sorry

@@ -210,6 +210,9 @@ class CO2BrineFluid : public MultiFluidBase
/// Output csv file containing informations about PVT
integer m_writeCSV;

/// Write PVT tables in log
bool m_writeInLog;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not keeping local?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for symmetry with m_writeCSV but can revert if you prefer

{
static constexpr int getMinLogLevel() { return 2; }
static constexpr std::string_view getDescription() { return "well statistics information"; }
static constexpr std::string_view getDescription() { return "Information on fields import"; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you removed some details here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think so, the removed part was inaccurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants