mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
text
This commit is contained in:
parent
d3f093ca4a
commit
e3d5c581d4
2 changed files with 18 additions and 4 deletions
|
@ -395,9 +395,9 @@ static int CmdSetDebugMode(const char *Cmd) {
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
bool dg_0 = arg_get_lit(ctx, 0);
|
bool dg_0 = arg_get_lit(ctx, 1);
|
||||||
bool dg_1 = arg_get_lit(ctx, 1);
|
bool dg_1 = arg_get_lit(ctx, 2);
|
||||||
bool dg_2 = arg_get_lit(ctx, 2);
|
bool dg_2 = arg_get_lit(ctx, 3);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
if (dg_0 + dg_1 + dg_2 > 1 ) {
|
if (dg_0 + dg_1 + dg_2 > 1 ) {
|
||||||
|
@ -412,6 +412,20 @@ static int CmdSetDebugMode(const char *Cmd) {
|
||||||
|
|
||||||
if (dg_2)
|
if (dg_2)
|
||||||
g_debugMode = 2;
|
g_debugMode = 2;
|
||||||
|
|
||||||
|
switch(g_debugMode) {
|
||||||
|
case 0:
|
||||||
|
PrintAndLogEx(INFO, "client debug level... %u ( no debug messages )", g_debugMode);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
PrintAndLogEx(INFO, "client debug level... %u ( debug messages )", g_debugMode);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
PrintAndLogEx(INFO, "client debug level... %u ( verbose debug messages )", g_debugMode);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ static uint8_t PrintAndLogEx_spinidx = 0;
|
||||||
|
|
||||||
void PrintAndLogEx(logLevel_t level, const char *fmt, ...) {
|
void PrintAndLogEx(logLevel_t level, const char *fmt, ...) {
|
||||||
|
|
||||||
// skip debug messages if client debugging is turned off i.e. 'DATA SETDEBUG 0'
|
// skip debug messages if client debugging is turned off i.e. 'DATA SETDEBUG -0'
|
||||||
if (g_debugMode == 0 && level == DEBUG)
|
if (g_debugMode == 0 && level == DEBUG)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue