View Single Post
Old 03-12-2023, 05:24 PM   #6
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Input conversion plugin: how to get it to run in debug mode and output its log

Debugging works easily and reliably in both classes of plugins I have written, GUI and FileType. Except, now, an input conversion plugin. I cannot get a single debugging line out.

The Documentation for its particular plugin Class says "use the log". I have, in so many ways, and nothing ever happens.

After executing calibre-customize -b as normal, I then have tried three ways that I know of to run in debug mode:
calibre-debug -g
calibre-debug --gui-debug="C:\Users\xxx\Desktop\debug.log"
calibre.exe, then restart in debug mode using the menu option to do so.

None has ever worked, except that it shows that the FTS scanner fails because its (FTS') input conversion plugin that I am trying to develop and test is failing. Given that I have never seen a single debug line, or any other line, printed or logged successfully, I would be shocked if it were successful.

I have tried using the 'log' argument passed from whomever is calling the plugin that I cannot debug, including: log.debug; log.message; and log.error.

Results: Nada. Nichts. Nothing.

I tried using my own Python logger via logging.getLogger(), etc., but still nothing.

I tried writing out the accumulated debugging text to a .txt file using fd.write(), but nothing appeared in its destination folder, and since I have zero debugging output (actually, any output of any type), I have no clue as to why. And I never will without debugging.

So, might someone please graciously tell me how to output a debugging log from an input conversion plugin?


Thank you.


DaltonST

Last edited by DaltonST; 03-12-2023 at 05:27 PM.
DaltonST is offline   Reply With Quote