Skip to content

Ensure exit on LOGLEVEL_ERROR#1148

Merged
sporksmith merged 1 commit intoshadow:masterfrom
sporksmith:abort-on-error
Mar 5, 2021
Merged

Ensure exit on LOGLEVEL_ERROR#1148
sporksmith merged 1 commit intoshadow:masterfrom
sporksmith:abort-on-error

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

No description provided.

@sporksmith sporksmith requested a review from stevenengler March 5, 2021 16:56
@stevenengler
Copy link
Copy Markdown
Contributor

stevenengler commented Mar 5, 2021

(Just a note) In debug mode the Shadow logger will override this behaviour, but will still abort in utility_assert() -> utility_handleError().

if (level == LOGLEVEL_ERROR) {
    ...

    /* now abort, but get a backtrace */
    utility_assert(FALSE && "failure due to error-level log message");
}

@sporksmith
Copy link
Copy Markdown
Contributor Author

(Just a note) In debug mode the Shadow logger will override this behaviour, but will still abort in utility_assert() -> utility_handleError().

if (level == LOGLEVEL_ERROR) {
    ...

    /* now abort, but get a backtrace */
    utility_assert(FALSE && "failure due to error-level log message");
}

Yeah, I was initially planning on changing it, but decided to leave it in place since the utility_assert also prints a stack backtrace. Maybe that behavior would be worth adding to the base logger as well, but it'd take a little work since currently utility_assert is part of Shadow itself.

@sporksmith sporksmith merged commit 482458a into shadow:master Mar 5, 2021
@sporksmith sporksmith deleted the abort-on-error branch March 5, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants