Rotate log file

It looks like the log file .config/joplin-desktop/log.txt never gets truncated/rotated by Joplin itself (this applies probably to the other log files as well).
Do I miss something or should/can I create a logrotate conf file snippet on my Linux system myself?


Nope, you’re not missing anything. There’s currently no rotation. But I like the idea.

As for the logrotate question, I’m not sure. I don’t know, if the logger process keeps the file pointer open, and what would happen, if one were to just remove the underlying file. Maybe @laurent can answer this.

I think the file doesn’t stay open between writes so it should be fine to rotate it. Eventually we should integrate this feature to the app too as it’s true the log keeps growing without limit at the moment.

1 Like

OK, so I I’ll give it a try with the following logrotate file:

“/home/user/.config/joplin-desktop/log.txt” {
rotate 7

  • option daily only for testing, weekly would be more appropriate
  • option copytruncate should handle the case if the logger process keeps the file open
  • option postrotate could be necessary if some process needs to be restarted

OK, it works (like expected).
I’ll use the following file as conf. file for logrotate:

/home/user/.config/joplin-desktop/log*.txt {
rotate 4

This will rotate weekly (and compress) every log file found in /home/user/.config/joplin-desktop/ and keep 4 old files.
Hint: one does not need to restart any service after putting this file into place (/etc/logrotate.d) since logrotate is not a daemon but started via crontab/systemd timer.


Is there a way to do this in Windows? I know Linux has commands to truncate log files but I don't know about Windows.

  • Thanks Miwie, for Linux the logroate option is easy and nice I will try it.

  • I use Joplin also with Windows.

  • I found out that the Graph-Plugin writes many output in the logfiles, it seems every second.
    You can just look for the homedir/.config/joplin-desktop/log.txt
    how it grows ervery second!

  • I look into the logfile, that tells us:
    2022-06-02 23:53:52: BackOffHandler: "Plugin joplin-plugin-knowledge-graph: Applying a backoff of 8 seconds due to frequent plugin API calls. Consider reducing the number of calls, caching the data, or requesting more data per call. API call was: ", "", "[["tags","32e55312cc4546f1894b9e88e51d36b6","notes"],{"fields":["id"]}]", "[Wait count: 1]"

So in the Options:
Time interval (in ms) between updates requests to joplin. - DEFAULT: 1000

  • You may consider to increase the UPDATE INTERVAL to 30000 or more milliseconds,
    so a look into the logfile MAY HELP A LOT!

  • AND consider: Do you really need this plugin!!

  • I also appreciate, if there may be a log rotate of log file management for Windows!