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

refactor: Log level documentation on SolverBase and children #3230

Merged
merged 81 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
fbe6085
Add a way to expend the description of a wrapper
MelReyCG Apr 3, 2024
de6c78e
loglevel first iteration
arng40 Apr 25, 2024
55ef101
log level documentation sorted
arng40 May 16, 2024
b55bb04
log-level doc correction
arng40 May 17, 2024
d333678
enable log level + small corretion appendLogLevel
arng40 May 21, 2024
12da842
melvin review ( archi updated )
arng40 May 21, 2024
65d8ae9
renaming / constness / refacto
arng40 May 21, 2024
f957cea
uncrustify
arng40 May 21, 2024
69f94df
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 May 21, 2024
8de5703
add missing log
arng40 May 22, 2024
a720b27
update comment
arng40 May 22, 2024
dcf4fa7
adding new doc + update
arng40 May 24, 2024
78badfa
update solver log
arng40 May 24, 2024
0c32b52
log message correction
arng40 May 24, 2024
ed7a285
doc corrections
arng40 May 27, 2024
c3cdc0d
rst added
arng40 Jun 19, 2024
de56ea7
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Jun 20, 2024
b47ffe8
fix and updates rst
arng40 Jun 20, 2024
c56f007
small update
arng40 Jun 27, 2024
640d1e0
add structure refacto (not working)
arng40 Jul 16, 2024
0bb745c
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Jul 16, 2024
ab6ddf9
beginning cohabitation witk old code
arng40 Jul 16, 2024
a8ac94c
compilation almost done
arng40 Jul 17, 2024
1553255
add traits to addLogLevel and fix compilation
arng40 Jul 18, 2024
2d9a4c9
add a macro, empty loglevelRegistry and some fix
arng40 Jul 19, 2024
548759d
add doxygen
arng40 Jul 19, 2024
dc9d1c3
omission and blank space first pass
arng40 Jul 23, 2024
f9cab87
melvin review
arng40 Jul 23, 2024
bb83468
2nd pass
arng40 Jul 23, 2024
93f29b9
blank space and unused comment
arng40 Jul 23, 2024
56683ed
uncrustify
arng40 Jul 23, 2024
9c718b3
do_not_document added for log info
arng40 Jul 23, 2024
b23046e
whitespaces removed
arng40 Jul 23, 2024
3d09a53
add end_cond
arng40 Jul 23, 2024
e36b700
doxygen
arng40 Jul 23, 2024
92127b4
missing doc
arng40 Jul 23, 2024
4ce039a
revert some minor changes
arng40 Jul 23, 2024
dfd6f3f
SAME
arng40 Jul 23, 2024
511fa2e
whitespace
arng40 Jul 23, 2024
6d57229
.
arng40 Jul 23, 2024
5a59f9f
melvin review #2
arng40 Jul 24, 2024
a46fea6
rst
arng40 Jul 24, 2024
8a4298d
xsd
arng40 Aug 20, 2024
7bb1dda
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Aug 20, 2024
ebc4156
reset log message on hydro
arng40 Aug 20, 2024
633880f
fix error on cmake
arng40 Aug 21, 2024
95f00b8
path updated
arng40 Aug 23, 2024
53e8dff
log level rt verification
arng40 Aug 23, 2024
6e96732
Revert "log level rt verification"
arng40 Aug 23, 2024
e516144
update GEOS_LOG_INFO to GEOS_LOG
arng40 Aug 23, 2024
e67bc3f
reorganized log info file
arng40 Aug 29, 2024
f8359bb
reorganization of function + realeased earlier m_logLevelsRegistry
arng40 Aug 30, 2024
e4d184d
uncrustify
arng40 Aug 30, 2024
67b21ef
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Aug 30, 2024
ebf7ccf
const function added
arng40 Aug 30, 2024
cbf01ee
rst updated
arng40 Aug 30, 2024
84122ee
fix compil crash by removing unecassery line on cmake event
arng40 Aug 30, 2024
a7a3813
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Sep 16, 2024
6aa91ad
update on description
arng40 Sep 16, 2024
3164e56
Merge branch 'develop' into feature/dudes/log-level-doc-poc
rrsettgast Sep 24, 2024
0b129a6
xsd
arng40 Sep 24, 2024
8526e0b
Merge branch 'feature/dudes/log-level-doc-poc' of https://github.com/…
arng40 Sep 24, 2024
2257c3c
xsd
arng40 Sep 25, 2024
f770091
Merge branch 'feature/dudes/log-level-doc-poc' of https://github.com/…
arng40 Sep 25, 2024
1fbe2ba
remove rst
arng40 Sep 25, 2024
13912db
remove rst
arng40 Sep 25, 2024
aeb0988
remove unacessary loglevel + 1st description correction
arng40 Oct 1, 2024
f449224
line search and implit step desc updated
arng40 Oct 1, 2024
8ba8cd9
hydrau descrption solverTimeStep unnecessary
arng40 Oct 1, 2024
5d33273
refactor: log levels solvers (#3378)
paveltomin Oct 3, 2024
0b2d8c2
Merge remote-tracking branch 'origin/develop' into feature/dudes/log-…
arng40 Oct 3, 2024
2ec2398
update CMFVM
arng40 Oct 3, 2024
9c173d7
add macro GEOS_LOG_LEVEL_INFO_RANK_0_NLR
arng40 Oct 4, 2024
b794899
uncrustify
arng40 Oct 4, 2024
6d63f14
move/add log structure & small correction
arng40 Oct 8, 2024
9fed5a3
attempt to fix doxy
arng40 Oct 8, 2024
8719562
space
arng40 Oct 8, 2024
d2fb32e
fix doxygen
arng40 Oct 8, 2024
430090f
Merge branch 'develop' into feature/dudes/log-level-doc-poc
MelReyCG Oct 8, 2024
f16c6ce
revert loglevel
arng40 Oct 9, 2024
e7242f0
revert loglevel
arng40 Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
renaming / constness / refacto
arng40 committed May 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 65d8ae9958c1dc27b988451d91c0d34905e45726
21 changes: 10 additions & 11 deletions src/coreComponents/dataRepository/Group.cpp
Original file line number Diff line number Diff line change
@@ -79,23 +79,22 @@ void Group::deregisterWrapper( string const & name )
m_conduitNode.remove( name );
}

void Group::addEntrieLogLevel( std::string const & level, std::string const & description )
void Group::addLogLevelEntry( string_view level, string_view description )
{
m_logLevelsDescriptions[level].push_back( description );
m_logLevelsDescriptions[string(level)].push_back( string(description) );
}

void Group::appendLogLevelDescription( std::string levelCondition, std::string logDescription )
void Group::appendLogLevelDescription( string_view levelCondition, string_view logDescription )
{
string logLevelName = viewKeyStruct::logLevelString();
levelCondition.insert( 0, "\n" ).append( "\n" );
if( !hasWrapper( logLevelName ) )
Wrapper< integer > * wrapper = getWrapperPointer< integer >( viewKeyStruct::logLevelString() );
if( wrapper == nullptr )
{
enableLogLevelInput();
wrapper = &registerWrapper( viewKeyStruct::logLevelString(), &m_logLevel );
wrapper->setApplyDefaultValue( 0 );
wrapper->setInputFlag( InputFlags::OPTIONAL );
}

WrapperBase & wrapper = getWrapperBase( logLevelName );
addEntrieLogLevel( levelCondition, logDescription );
wrapper.buildLogLevelDescription( m_logLevelsDescriptions );
addLogLevelEntry( levelCondition, logDescription );
wrapper->buildLogLevelDescription( m_logLevelsDescriptions );
}

void Group::resize( indexType const newSize )
4 changes: 2 additions & 2 deletions src/coreComponents/dataRepository/Group.hpp
Original file line number Diff line number Diff line change
@@ -859,7 +859,7 @@ class Group
* @param levelCondition The level condition to append
* @param logDescription The log description to append
*/
void appendLogLevelDescription( std::string levelCondition, std::string logDescription );
void appendLogLevelDescription( string_view levelCondition, string_view logDescription );

/**
* @name Schema generation methods
@@ -1494,7 +1494,7 @@ class Group
* @param level The log level key
* @param description The log description value
*/
void addEntrieLogLevel( std::string const & level, std::string const & description );
void addLogLevelEntry( string_view level, string_view description );

/**
* @brief Performs re-initialization of certain variable depending on the solver being used.
6 changes: 3 additions & 3 deletions src/coreComponents/dataRepository/WrapperBase.hpp
Original file line number Diff line number Diff line change
@@ -522,19 +522,19 @@ class WrapperBase
/**
* @brief Construct the log level string description for a wrapper
*/
void buildLogLevelDescription( std::map< std::string, std::vector< std::string > > & logLevelsDescriptions )
void buildLogLevelDescription( std::map< std::string, std::vector< std::string > > const & logLevelsDescriptions )
{
string descriptionToBuild;
descriptionToBuild.append( "Sets the level of information to write in the standard output (the console typically).\n"
"A level of 0 outputs minimal information, higher levels require more." );
for( auto const & [logLevel, logDescriptions] : logLevelsDescriptions )
{
descriptionToBuild.append( logLevel );
descriptionToBuild.append( GEOS_FMT( "\n{}\n", logLevel ) );
size_t idxDescription = 0;
for( const auto & description : logDescriptions )
{
idxDescription == logDescriptions.size() - 1 ? descriptionToBuild.append( " - " + description ) :
descriptionToBuild.append( " - " + description + "\n" );
descriptionToBuild.append( GEOS_FMT( " - {}\n", description ) );
idxDescription++;
}
}