Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 05-10-2025, 05:15 AM   #1
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,602
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Has anything changed in debug log?

Hello,

I've got calibre 8.4 installed on Windows 10. Till now, the debug log was inside a temporal folder I've defined and it containes information.
Now, it is stored in
C:\Users\<user>\AppData\Local\calibre-cache\calibre-debug-log.txt and it is empty ALL the times. As I haven't changed anything in my configuration (that I'm aware....), can you please tell me what do I have to do to solve it?

NOTE: It looks like calibre has been modified to write always the same file. This is fine if you finish calibre and get the log. The issue is when you restart calibre to get the log and continue working. It looks like it's overwritten in restart, so you have to stop, check the log, restart and restart again in debug mode (or start always in debug mode from command line).

Last edited by Terisa de morgan; 05-10-2025 at 05:35 AM. Reason: Found the issue
Terisa de morgan is offline   Reply With Quote
Old 05-10-2025, 09:30 AM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
The way I use the debug log is like this:

- click Restart in debug mode
- see the output
- click Restart (the blue button, from then on)

In previous debug logs display behaviour, to which I got used, this resulted often in several notepad (notepad3 in my case) files in taskbar - like tmp56yhhh.txt, tmp82883jjj.txt, and so on. I wouldn't close them immediately after checking, so I often ended up with the taskbar full of log files, as I don't combine tasks in taskbar. One solution for this would be a batch script to terminate all notepad3 processes, however I have often times other unsaved notes open, then...this not suitable.

Current behaviour to which I'm trying to get used: initially the notepad3 calibre-debug-log.txt file opens empty and i get the following prompt after the first restart:

Click image for larger version

Name:	MWSnap 2025-05-10, 10_02_25.png
Views:	29
Size:	767.4 KB
ID:	215594

What I do is click "Monitor" and this works fine because there's only one item in taskbar during all restarts. But in a previous 8.x version, can't pinpoint which, something wasn't working correctly; I believe this has been fixed by https://github.com/kovidgoyal/calibr...727d47ffd7d1fa.

I'd need to click Monitor all the time across restarts - not just once upon initial restart. Today on quick tests I notice it's needed to click Monitor only once and that's great news, but I sometimes would like to see the overwritten logs like before - one for each restart.

Last edited by Comfy.n; 05-10-2025 at 10:03 AM.
Comfy.n is offline   Reply With Quote
Old 05-11-2025, 12:37 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,243
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Nowadays calibre guarantees to delete all its tempfiles even if it crashes or is killed with SIGKILL. That means it cant use temp files for debug logs anymore.
So you get a fixed, single debug log file.
kovidgoyal is online now   Reply With Quote
Old 05-11-2025, 12:39 AM   #4
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
thanks Kovid
Comfy.n is offline   Reply With Quote
Old 05-11-2025, 02:38 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,602
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you for the explanation. As I say, the only issue is the empty file if you restart in debug mode but I can work around that.
Terisa de morgan is offline   Reply With Quote
Old 05-11-2025, 09:39 AM   #6
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1355861
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
I prefer to open calibre as 'calibre-debug -g' from the terminal. This way I can restart many times while debugging.
thiago.eec is offline   Reply With Quote
Old 05-16-2025, 07:29 AM   #7
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by thiago.eec View Post
I prefer to open calibre as 'calibre-debug -g' from the terminal. This way I can restart many times while debugging.
Hey thiago.ecc, thanks for the suggestion.

I tried that using this bat script

C:\CALIBRE_8\Calibre\calibre-debug.exe -g

That's a portable install; I do most tests using portable calibre instances (different versions, distinct settings). What happens is that, when running it that way I have my system default library open instead of the one in the portable path. And it loads settings from the OS install as well... (%appdata%\calibre)

At one point I also tried Kovid's original way of debugging using calibre-customize but couldn't adapt it to my workflow with portable instances.

I get this when running --paths..

C:\CALIBRE_8\Calibre>C:\CALIBRE_8\Calibre\calibre-debug.exe --paths
CALIBRE_RESOURCES_PATH=C:\CALIBRE_8\Calibre\app\re sources
CALIBRE_EXTENSIONS_PATH=C:\CALIBRE_8\Calibre\app\b in
CALIBRE_PYTHON_PATH=

What's the correct way to debug a portable instance, loading the settings and library from the portable install path?
Comfy.n is offline   Reply With Quote
Old 05-16-2025, 07:51 AM   #8
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1355861
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by Comfy.n View Post
Hey thiago.ecc, thanks for the suggestion.
You're welcome!

Quote:
Originally Posted by Comfy.n View Post
What's the correct way to debug a portable instance, loading the settings and library from the portable install path?
I don't know if there is a better way, but this is how I did. I used a bat script with the following content and saved inside 'Calibre Portable\Calibre':
Code:
@echo off
set CALIBRE_CONFIG_DIRECTORY=..\Calibre Settings
D:
cd "D:\Calibre Portable\Calibre"
calibre-debug -g
thiago.eec is offline   Reply With Quote
Old 05-16-2025, 08:49 AM   #9
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by thiago.eec View Post
You're welcome!


I don't know if there is a better way, but this is how I did. I used a bat script with the following content and saved inside 'Calibre Portable\Calibre':
Code:
@echo off
set CALIBRE_CONFIG_DIRECTORY=..\Calibre Settings
D:
cd "D:\Calibre Portable\Calibre"
calibre-debug -g
Brilliant! Thank you so much.
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
debug log? agumon1123 Calibre Companion 3 02-11-2022 01:38 AM
Difference between log.debug, log.info, log.warn log.error lrpirlet Development 3 02-20-2021 03:43 AM
[Android] Calibre companion debug log waldoB Calibre Companion 4 12-27-2016 08:35 AM
wifi to Kindle does not work; debug log as requested solin111 Devices 0 02-13-2013 10:39 PM
Does anyone know how to read a Calibre debug log file? TomOnMobread Calibre 7 12-11-2012 01:57 PM


All times are GMT -4. The time now is 02:37 AM.


MobileRead.com is a privately owned, operated and funded community.