You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-17 01:12:23 +02:00
Improve log performance, simplify macros, rename logWill() to logAny().
Pre-calculate the value used by logAny() to improve performance and make it more likely to be inlined. Move IF_LOG_ANY() into LOG_INTERNAL() to simplify the macros and improve performance of LOG() and LOG_PID(). If the message has no chance of being logged there's no reason to call logInternal(). Rename logWill() to logAny() because it seems more intuitive.
This commit is contained in:
@ -168,7 +168,7 @@ protocolClientReadOutput(ProtocolClient *this, bool outputRequired)
|
||||
"%s: %s", strPtr(this->errorPrefix), message == NULL ? "no details available" : strPtr(message));
|
||||
|
||||
// Add stack trace if the error is an assertion or debug-level logging is enabled
|
||||
if (type == &AssertError || logWill(logLevelDebug))
|
||||
if (type == &AssertError || logAny(logLevelDebug))
|
||||
{
|
||||
const String *stack = varStr(kvGet(responseKv, VARSTR(PROTOCOL_ERROR_STACK_STR)));
|
||||
|
||||
|
Reference in New Issue
Block a user