Logging: setting log level wasn't working

This commit is contained in:
Campbell Barton
2018-05-04 08:00:22 +02:00
parent f3c5b0394f
commit c7cfee04c4
3 changed files with 21 additions and 2 deletions

View File

@@ -725,8 +725,11 @@ static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(da
if (!parse_int_clamp(argv[1], NULL, -1, INT_MAX, &G.log.level, &err_msg)) {
printf("\nError: %s '%s %s'.\n", err_msg, arg_id, argv[1]);
}
if (G.log.level == -1) {
G.log.level = INT_MAX;
else {
if (G.log.level == -1) {
G.log.level = INT_MAX;
}
CLG_level_set(G.log.level);
}
return 1;
}