How to disable console log of QxOrm?

Forum for posting problems using QxOrm library

How to disable console log of QxOrm?

Postby phonix » Sat Apr 11, 2020 2:27 pm

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!
phonix
 
Posts: 6
Joined: Mon Mar 30, 2020 4:04 am

Re: How to disable console log of QxOrm?

Postby phonix » Sun Apr 12, 2020 4:54 am

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?
phonix
 
Posts: 6
Joined: Mon Mar 30, 2020 4:04 am

Re: How to disable console log of QxOrm?

Postby qxorm » Sun Apr 12, 2020 12:14 pm

Hello,

You can disable logs using qx::QxSqlDatabase settings class (singleton) :
Code: Select all
qx::QxSqlDatabase::getSingleton()->setTraceSqlQuery(false);
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron