You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a lot of boilerplate code in the code base for screen output like
if (rank == MASTER_NODE) {
cout << "My Message" << endl;
}
This is not a good example from many points of view.
From performance-wise overly used std::endl is a killer. If one needs to redirect output to file it is additional loss etc.
From the user's perspective, it is not possible to set the logging level. At least a three-level logging would be nice (INFO/WARNING/DEBUG) this also makes life easier for developers too.
It is also nice to have a rotating log file if one runs longer cases on the HPC systems. After a while the log files getting so bloating
Describe the solution you'd like
A configurable logger would be better with defaults not changing the current system
This is a nice-to-have but there are 2600 uses of cout << in SU2, are you sure you want to refactor all of them?
If you pick something with operator << it will be easier.
There are some tricks possible to add the << operator. Not all the code base needs refactoring. We can have both styles for the future as () syntax is very powerful thanks to fmtlib.
There is a lot of boilerplate code in the code base for screen output like
This is not a good example from many points of view.
From performance-wise overly used
std::endl
is a killer. If one needs to redirect output to file it is additional loss etc.From the user's perspective, it is not possible to set the logging level. At least a three-level logging would be nice (INFO/WARNING/DEBUG) this also makes life easier for developers too.
It is also nice to have a rotating log file if one runs longer cases on the HPC systems. After a while the log files getting so bloating
Describe the solution you'd like
A configurable logger would be better with defaults not changing the current system
In the code
For general messages
There is also a lot of
--------------- Start Solver ----------
type headers in the code we can automate this asHEADER << "Start Solver";
Describe alternatives you've considered
A proper choice of logging library is required. Alternatives I considered:
AixLog
<<
operatorspdlog
easylogging
<<
operatorglog
<<
operatorI am in favor of spdlog library
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: