feat: Add command-line option to control developper information output in diagnostic messages#3980
Open
feat: Add command-line option to control developper information output in diagnostic messages#3980
Conversation
arng40
reviewed
Feb 23, 2026
| }; | ||
|
|
||
| /** | ||
| * @enum MsgType |
Contributor
There was a problem hiding this comment.
You mean "DiagnosticInfoLevel"
arng40
reviewed
Feb 23, 2026
| #include "common/DataTypes.hpp" | ||
| #include "common/format/Format.hpp" | ||
| #include "common/format/StringUtilities.hpp" | ||
| #include <array> |
arng40
reviewed
Feb 23, 2026
Comment on lines
+115
to
+123
| enum class MsgType : integer | ||
| { | ||
| Undefined, | ||
| Error, | ||
| ExternalError, | ||
| Warning, | ||
| Exception, | ||
| Undefined | ||
| Count // internal use, keep at last | ||
| }; |
Contributor
There was a problem hiding this comment.
A suggestion, typeToString may be redundant with EnumString.
You could use EnumString instead of typeToString by moving this enum to a separate class.
Contributor
Author
There was a problem hiding this comment.
I just renamed ErrorLogger::toString(), but yes I can refactor if this function is not useful.
It is not in a class right?
Contributor
Author
There was a problem hiding this comment.
Ok, no I'm not able to do this with enum-strings. It is to avoid circular header dependancy.
Contributor
There was a problem hiding this comment.
Maybe put MsgType in another file, it will avoid the circular dependency
arng40
reviewed
Feb 23, 2026
|
|
||
|
|
||
| #include "common/logger/GeosExceptions.hpp" | ||
| #include "common/logger/ErrorHandling.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new command-line option to control diagnostic log verbosity in GEOS. The goal is to reduce the verbosity of logs by default while still providing detailed developer information when needed.
New option:
For an error,
-d 0would give:... and
-d 1would give:The last option,
-d 2, also enables the output of stack trace and source file for warnings.Stack traces and source files are still included in the YAML output through the
-eoption, but now users can control the presence of developper information in the log through this new-doption.