lib/xtrx: honouring/using the loglevel parameter

loglevel parameter is never used and let loglevel to DEBUG, with an
annoying flood of message in terminal.

This patch adds a call to xtrx_log_setlevel() at xtrx constructor level.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Signed-off-by: Eric Wild <ewild@sysmocom.de>
This commit is contained in:
Gwenhael Goavec-Merou 2023-07-02 07:10:14 +02:00 committed by Eric Wild
parent 39ef03d961
commit a6afeaa3a1
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ xtrx_obj::xtrx_obj(const std::string &path, unsigned loglevel, bool lmsreset)
unsigned xtrxflag = (loglevel & XTRX_O_LOGLVL_MASK) | ((lmsreset) ? XTRX_O_RESET : 0);
std::cerr << "xtrx_obj::xtrx_obj = " << xtrxflag << std::endl;
xtrx_log_setlevel(loglevel, NULL);
int res = xtrx_open_string(path.c_str(), &_obj);
if (res < 0) {
std::stringstream message;