-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature: sink level and common update #35
Conversation
* update: clang-format rules Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * update: format the following updated rules Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * feature: max level for sink Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * update: explaining comment of config options Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * fix: some crashes at log configuration Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * update: clang-tidy rules Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * update: CI workflows Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * fix: clang-tidy issues Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> * fix linker error (#33) Signed-off-by: turuslan <[email protected]> (cherry picked from commit 444f3da) --------- Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> (cherry picked from commit 042712e)
@@ -21,13 +21,13 @@ | |||
*/ | |||
|
|||
#define _SL_LOG_IF_LEVEL(LOG, LVL, FMT, ...) \ | |||
do { \ | |||
({ \ |
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.
Do we allow/use https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html ?
If we use it, then we may use BOOST_OUTCOME_TRYX
// OUTCOME_TRY but it's expression
auto x = BOOST_OUTCOME_TRYX(foo()) + BOOST_OUTCOME_TRYX(bar());
#define BOOST_OUTCOME_TRYX(expr)
({
auto tmp = expr;
// return inside statement expression
if (tmp.has_error()) return error;
tmp.value();
})
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.
Why not? This is topic for discuss
if (level_string == "debug" || level_string == "deb") { | ||
if constexpr (debug_level_disable) { | ||
errors_ << "W: Level 'debug' in " << target << " won't work: " | ||
<< "it has disabled with compile option" |
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.
<< "it has disabled with compile option" | |
<< "it was disabled with compile option" |
c2587e9
to
7632dae
Compare
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
7632dae
to
a30f060
Compare
#13@xDimon/soralog