mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
log: application debug logs should be still disabled until debug is enabled
This commit is contained in:
parent
19fe1bd5d9
commit
bda8fb6ac2
1 changed files with 12 additions and 4 deletions
|
|
@ -38,12 +38,20 @@
|
|||
levelC = 'W';
|
||||
} else if ((severity & ORTP_MESSAGE) != 0) {
|
||||
levelC = 'I';
|
||||
} else if (((severity & ORTP_TRACE) != 0) || ((severity & ORTP_DEBUG) != 0)) {
|
||||
} else if ((severity & ORTP_DEBUG) != 0) {
|
||||
levelC = 'D';
|
||||
}
|
||||
// we want application logs to be always enabled so use | ORTP_ERROR extra mask
|
||||
ortp_log(severity | ORTP_ERROR, "%c %*s:%3d - %s", levelC, filesize,
|
||||
filename + MAX((int)strlen(filename) - filesize, 0), line, utf8str);
|
||||
|
||||
if ((severity & ORTP_DEBUG) != 0) {
|
||||
// lol: ortp_debug(XXX) can be disabled at compile time, but ortp_log(ORTP_DEBUG, xxx) will always be valid even
|
||||
// not in debug build...
|
||||
ortp_debug("%c %*s:%3d - %s", levelC, filesize, filename + MAX((int)strlen(filename) - filesize, 0), line,
|
||||
utf8str);
|
||||
} else {
|
||||
// we want application logs to be always enabled (except debug ones) so use | ORTP_ERROR extra mask
|
||||
ortp_log(severity | ORTP_ERROR, "%c %*s:%3d - %s", levelC, filesize,
|
||||
filename + MAX((int)strlen(filename) - filesize, 0), line, utf8str);
|
||||
}
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue