Index: generic/nsf.c =================================================================== diff -u -r4ff9a500da01c6c0bb361cfba9a99b5b81cca310 -r8e079b542dd68c7975117266efba2b4701909ce9 --- generic/nsf.c (.../nsf.c) (revision 4ff9a500da01c6c0bb361cfba9a99b5b81cca310) +++ generic/nsf.c (.../nsf.c) (revision 8e079b542dd68c7975117266efba2b4701909ce9) @@ -595,7 +595,7 @@ nonnull_assert(interp != NULL); nonnull_assert(fmt != NULL); - if (RUNTIME_STATE(interp)->debugLevel >= requiredLevel) { + if (requiredLevel >= RUNTIME_STATE(interp)->logSeverity) { Tcl_DString cmdString, ds; const char *level; va_list ap; @@ -14469,7 +14469,7 @@ } else { result = TCL_OK; #if defined(NSF_WITH_VALUE_WARNINGS) - if (RUNTIME_STATE(interp)->debugLevel > 0) { + if (RUNTIME_STATE(interp)->logSeverity == NSF_LOG_DEBUG) { const char *value = ObjStr(objPtr); if (unlikely(*value == '-' && (pPtr->flags & NSF_ARG_CHECK_NONPOS) != 0u @@ -24760,17 +24760,17 @@ } if (configureoption == ConfigureoptionDebugIdx) { - int level; if (valueObj != NULL) { - int result = Tcl_GetIntFromObj(interp, valueObj, &level); + int level, result = Tcl_GetIntFromObj(interp, valueObj, &level); + if (unlikely(result != TCL_OK)) { return result; } - RUNTIME_STATE(interp)->debugLevel = level; + RUNTIME_STATE(interp)->logSeverity = level; } Tcl_SetIntObj(Tcl_GetObjResult(interp), - RUNTIME_STATE(interp)->debugLevel); + RUNTIME_STATE(interp)->logSeverity); return TCL_OK; } @@ -32016,6 +32016,7 @@ NsfProfileInit(interp); #endif rst = RUNTIME_STATE(interp); + rst->logSeverity = NSF_LOG_NOTICE; rst->doFilters = 1; rst->doCheckResults = 1; rst->doCheckArguments = NSF_ARGPARSE_CHECK;