[CMD] Support dynamic trace (#7093)

Based on Hans Harder's patch.
Realize tracing cmd on console
output.
JIRA issue: CORE-6669
- Add FEATURE_DYNAMIC_TRACE
  feature.
- Add CmdTrace function.
- Re-define FIXME, ERR, WARN,
  and TRACE macros.
- Check CMDTRACE environment
  variable. If it was "ON", then enable
  dynamic trace.
This commit is contained in:
Katayama Hirofumi MZ 2024-07-09 04:25:30 +09:00 committed by GitHub
parent 6c74e69d12
commit 3dcae2ce0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 106 additions and 4 deletions

View file

@ -175,6 +175,13 @@ INT cmd_set(LPTSTR param)
}
*p++ = _T('\0');
#ifdef FEATURE_DYNAMIC_TRACE
/* Check for dynamic TRACE ON/OFF */
if (!_tcsicmp(param, _T("CMDTRACE")))
g_bDynamicTrace = !_tcsicmp(p, _T("ON"));
#endif
if (!SetEnvironmentVariable(param, *p ? p : NULL))
{
retval = 1;