Add logging to help debug some capture stalls

Authored by murveit on Feb 16 2020, 5:20 PM.



Can remove these later after issues have been resolved.

Diff Detail

R321 KStars
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Feb 16 2020, 5:20 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptFeb 16 2020, 5:20 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Feb 16 2020, 5:20 PM

Ok I really feel now that we need to add another layer for debugging.. KSTARS_DEV or something that can be turned on/off like the rest. There should be regular debugging and then development highly verbose debugging so that when normal folks just want to send a log of a general issue, it's more useful to us and doesn't become very hard to decipher. When we are hunting a specific issue we can ask to turn on development debugging which adds more verbose info such as the ones described above.

Jasem, I understand you sentiments, but in this case I respectfully disagree.
Here, the first 3 debug log statements will add at most one line per initiation of autofocus, and most likely nothing at all.
That's 0-10 or 20 lines in logs that can be > 100K lines. The final log statement would add one one line per capture.
While that could be a hundred lines per log, again, a tiny percentage, and could help us debug a hard-to-find bug.

How about this: any time someone adds a log statement, they should estimate the number of lines added.
Perhaps we should also schedule removal of such lines.

Also, it would make sense to go over the current logging and decide which statements are no longer necessary.
I think that makes more sense than adding another debugging layer.

In any case, I'd recommend that we add the statements in this PR in hopes that they help us find the current issues,
and then discuss in a month or two whether to remove them.

Alright I'll add these debug statements for now. But some software do have multiple levels of verbosity.. we need to strike a balance and one way of doing this is to add another layer.

mutlaqja accepted this revision.Feb 17 2020, 5:27 AM
This revision is now accepted and ready to land.Feb 17 2020, 5:27 AM
This revision was automatically updated to reflect the committed changes.