Nathan replied to the topic 'How to log' in the forum. 4 months ago

Hi Jasem. Thank you for replying. So to clarify, that means it is no longer necessary to add addDebugControl()?

I've discovered the issue though, not sure if you want to make a change.

When I initially start KStars and Ekos, this creates a log folder with the current date and within that, it creates a .txt file with the current time. If I delete the log file and restart Ekos, it creates a new .txt file. However, if I delete the current date folder, it no longer creates log files, nor does it recreate the date folder. You have to close KStars and restart the whole program for it to create a new date folder before logs will start showing back up.

The second log issue I'm having is regarding the actual logging. This is what's in my code:
LOG_DEBUG("Sending Command and recording with LOG_DEBUG");
LOG_INFO("Sending command and recording with LOG_INFO");
LOGF_DEBUG("CMD <%s>", command);

Even though I have Verbose logging enabled, only the INFO is being recorded. Here's the output in my log file:
[2024-01-17T07:18:20.796 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:21.656 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:21.664 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:22.671 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:22.678 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:23.685 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "
[2024-01-17T07:18:23.693 EST INFO ][ org.kde.kstars.indi] - DarkLight Cover/Calibrator : "[INFO] Sending command and recording with LOG_INFO "

Why is DEBUG not being recorded?

Thanks,
Nathan

Read More...