mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Show exact log level required for stack trace param output instead of just "debug".
This commit is contained in:
parent
0ac176b722
commit
fa53e2eddb
@ -60,6 +60,10 @@
|
||||
|
||||
<p>Require <postgres/> catalog version when instantiating a <code>Manifest</code> object (and not loading it from disk).</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Show exact log level required for stack trace param output instead of just <quote>debug</quote>.</p>
|
||||
</release-item>
|
||||
</release-development-list>
|
||||
</release-core-list>
|
||||
|
||||
|
@ -177,7 +177,9 @@ stackTraceParamIdx(int stackIdx)
|
||||
return data->param;
|
||||
}
|
||||
|
||||
return "debug log level required for parameters";
|
||||
// If no parameters return the log level required to get them
|
||||
#define LOG_LEVEL_REQUIRED " log level required for parameters"
|
||||
return data->functionLogLevel == logLevelTrace ? "trace" LOG_LEVEL_REQUIRED : "debug" LOG_LEVEL_REQUIRED;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -103,9 +103,10 @@ testRun()
|
||||
" check stack trace");
|
||||
#endif
|
||||
|
||||
assert(stackTracePush("file1.c", "function2", logLevelDebug) == logLevelDebug);
|
||||
assert(stackTracePush("file1.c", "function2", logLevelTrace) == logLevelTrace);
|
||||
stackTrace[stackSize - 2].fileLine = 7777;
|
||||
assert(strcmp(stackTraceParam(), "debug log level required for parameters") == 0);
|
||||
assert(strcmp(stackTraceParam(), "trace log level required for parameters") == 0);
|
||||
stackTrace[stackSize - 1].functionLogLevel = logLevelDebug;
|
||||
|
||||
TRY_BEGIN()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user