-
Notifications
You must be signed in to change notification settings - Fork 89
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
Adding logLevel documentation #3089
Conversation
src/coreComponents/constitutive/relativePermeability/RelpermDriver.cpp
Outdated
Show resolved
Hide resolved
try | ||
{ | ||
WrapperBase & wrapper = getWrapperBase( logLevelName ); | ||
appendLogLevelToWrapper( wrapper, log ); | ||
}catch( std::domain_error const & ) | ||
{ | ||
WrapperBase & wrapper = registerWrapper( logLevelName, &m_logLevel ); | ||
enableLogLevelInput(); | ||
appendLogLevelToWrapper( wrapper, log ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this project, try-catch is for adding more info to errors, not to recover from an erroneous state.
Use a if-else syntax.
* @brief Append a log level/description to the description of the wrapped object | ||
* @param log An entry (log level/ log Description) to append | ||
*/ | ||
void appendLogLevel( std::pair< const std::string, const std::string > log ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appendLogLevelDescription( string_view loggingCondition, string_view caseDescription )
?
/// Map for building the log level string for each wrapper | ||
/// key : logLevel, values : description(s) for a level | ||
std::map< std::string, std::vector< std::string > > m_logLevelsDescriptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one logLevel
per Group
= only one map per Group
Every wrapper should not have logLevel
functionnalities, Group
should.
Those method & attributes you added in Wrapper
are not at the right place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking comments
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3089 +/- ##
===========================================
+ Coverage 55.71% 55.75% +0.03%
===========================================
Files 1031 1031
Lines 87698 87823 +125
===========================================
+ Hits 48863 48962 +99
- Misses 38835 38861 +26 ☔ View full report in Codecov by Sentry. |
How is all that connects with proposal about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we discuss the this in a meeting first?
* @param levelCondition The level condition to append | ||
* @param logDescription The log description to append | ||
*/ | ||
void appendLogLevelDescription( string_view levelCondition, string_view logDescription ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way, instead of having now 4 public
member functions and 2 attributes directly related to logs (and a entry in the viewKeysStruct
) to gather all the behaviors related to the log into a dedicated class
?
I personally do not want to add more and more stuff into Group
which is already big enough (+/- 120 public
member functions IIRC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit off-topic comment : I don't know if it would help, but in a long-term effort. I would say that if we use a similar approach with the group's wrappers with a WrapperContainers
, we could remove around 36 members (including const/non-const), allowing to clarify that methods like "size()" are related to Wrappers.
@TotoGaz Thanks for your feedback, in reply to your suggestion : |
This PR aim to document all
logLevel
in GEOS and to invite the contributors to set descriptions when they enable thelogLevel
wrapper:Currently, we have this output in all
Group
documentation files:This PR brings more context to all
logLevels
of GEOS:I.e.
SolidMechanics_LagrangianFEM.rst
: