Thelounge: Logging - limit disk usage of logs/<username>.sqlite files, remove old records

Created on 3 Oct 2018  Â·  15Comments  Â·  Source: thelounge/thelounge

Feature Description

Currently, there's no way how to control logs/.sqlite file size. It can grow forever. Although this is usually not an issue, it will be good to have a mechanism that will keep file size under control.

Use-cases

  • deployments with many users
  • deployments in public/private clouds (on OpenShift), where persistent storage for applications is usually limited

Ideas

  • keep max N messages in tables, use maxHistory parameter and run regular cleanups (SQL - delete oldest entries)
  • check sqlite vacuum feature and check if this can help to improve disk space usage of sqlite
Feature

All 15 comments

I think it would be great to be able to limit the messages by how old they are.
For example maybe I'd like to configure it to delete messages that are over 365 days old.

Or the other way around. Add function to clear history. Something like clear browsing history in browsers. Clear message history older than: