I’m trying to use the QGC_LOGGING_CATEGORY macro.

I understand that are Global(located in and locals(per file), i’m trying to open few of the categories, for example:
QGC_LOGGING_CATEGORY(VehicleLog, “VehicleLog”)
QGC_LOGGING_CATEGORY(MAVLinkProtocolLog, “MAVLinkProtocolLog”)

i read about QLoggingCategory( and tried using setFilterRules in order to add the wanted categories but i don’t know where should i located the code in order to activate the debug.

I prefer using c++ code and not in the files if it’s possible.


Are you trying to just turn some of these on? If so If you are modifying the code and want to add a new category you add a QGC_LOGGING_CATEGORY macro in your new source file and a Q_DECLARE_LOGGING_CATEGORY in your new header file.

I saw the link you sent but i compiling QGC and i want to run it directly from the QT without have to exit.
I’m just trying to open the debug print related to MAVLink/Vehicle, I know that i need to use this line of code:
but i just don’t know where to put it.

The big goal that i’m after is to be able to simulate a UAV(plane) for the QGC using a small QT program that will send all relevent(and some not relvent) data in the required freq.
I thought i will only need to send heartbeat but when i do that, the pixhawk doesn’t sent me the data indicating the roll,pitch,yaw in addition when i enter the setting(gear simbol) it doesn’t detect an airplane meaning it doesn’t shoe any option like Radio/Safty i can only see summery and firmware.

Could you recommend where should i look to find out what MAVLink message i need to send in order for QGC to “see” UAV?

I don’t know what that means.

The docs explain how to turn on debug output either from the UI or from the command line. Not sure why you need anything more than that. There is no need to change code to turn on existing debug output.