mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-18 05:42:22 +08:00
mdbx-test: add --loglevel= option.
This commit is contained in:
@@ -24,6 +24,7 @@ MDBX_NORETURN void usage(void) {
|
||||
"usage:\n"
|
||||
" --help or -h Show this text\n"
|
||||
"Common parameters:\n"
|
||||
" --loglevel=[0-7]|[extra..fatal]"
|
||||
" --pathname=... Path and/or name of database files\n"
|
||||
" --repeat=N Set repeat counter\n"
|
||||
" --threads=N Number of thread (unsupported for now)\n"
|
||||
@@ -319,6 +320,13 @@ int main(int argc, char *const argv[]) {
|
||||
config::duration, 1))
|
||||
continue;
|
||||
|
||||
logging::loglevel loglevel;
|
||||
if (config::parse_option(argc, argv, narg, "loglevel", loglevel)) {
|
||||
logging::setup(loglevel, "main");
|
||||
params.loglevel = static_cast<uint8_t>(loglevel);
|
||||
continue;
|
||||
}
|
||||
|
||||
const char *value = nullptr;
|
||||
if (config::parse_option(argc, argv, narg, "case", &value)) {
|
||||
fixup4qemu(params);
|
||||
|
||||
Reference in New Issue
Block a user