Page 1 of 1

How to disable console log of QxOrm?

PostPosted: Sat Apr 11, 2020 2:27 pm
by phonix
Hi All,

I'm new with QxOrm. I'm develop a demo app using QxOrm. Everything is good but I want to disable the log to console by QxOrm. How can we disable console log of QxOrm when we're starting the app from console? Thank you very much!

Re: How to disable console log of QxOrm?

PostPosted: Sun Apr 12, 2020 4:54 am
by phonix
I have research about this and see in https://www.qxorm.com/qxorm_en/tutorial.html a note:
Important note : QxOrm doesn't want to hide sql query (by default, all sql queries are displayed).
QxOrm cannot resolve all problems with sql and databases, so it is sometimes necessary to use QtSql engine of Qt library to write your own sql query or stored procedure.

Can you clear me that we can not disable those query log in the console, right?

Re: How to disable console log of QxOrm?

PostPosted: Sun Apr 12, 2020 12:14 pm
by qxorm
Hello,

You can disable logs using qx::QxSqlDatabase settings class (singleton) :
Code: Select all
qx::QxSqlDatabase::getSingleton()->setTraceSqlQuery(false);