mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +08:00
chg: skip printing DEBUG messages if global client debug variable it set to zero.
This commit is contained in:
parent
8b61916525
commit
69aa3bfeed
1 changed files with 8 additions and 3 deletions
|
@ -27,8 +27,13 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
||||||
int size;
|
int size;
|
||||||
static char *prefix[7] = { "", "[+] ", "[=] ", "[-] ", "[!] ", "[!!] ", "[#] "};
|
static char *prefix[7] = { "", "[+] ", "[=] ", "[-] ", "[!] ", "[!!] ", "[#] "};
|
||||||
|
|
||||||
size=strlen(prefix[level]);
|
if (g_debugMode == 0 && level == logLevel.DEBUG) {
|
||||||
strncpy(buffer, prefix[level], sizeof buffer);
|
// skip debug messages if client debugging is turned off i.e. 'DATA SETDEBUG 0'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
size = strlen(prefix[level]);
|
||||||
|
strncpy(buffer, prefix[level], sizeof buffer);
|
||||||
|
}
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args,fmt);
|
va_start(args,fmt);
|
||||||
|
|
Loading…
Reference in a new issue