Skip to content

Logs and configuration

Compare
Choose a tag to compare
@xxxserxxx xxxserxxx released this 17 Feb 19:13
· 401 commits to master since this release

Adds a feature request to prevent logs from eventually eating the entire drive. This was a tough one, as log rotation is arguably something kitchen-sinkish. OTOH, it's also (frequently) non-trivial for users to set up, and log size really can be a problem. So I included it.

Configurations can now be persisted in a config file. This was another hard one. gotop configuration really isn't complex, or widely varied. But, somebody asked for it, and somebody else provided a patch for it, so what the heck.

  • Added: Logs are now rotated. Settings are currently hard-coded at 4 files of 5MB each, so logs shouldn't take up more than 20MB. I'm going to see how many complain about wanting to configure these settings before I make them configurable.
  • Added: Config file support. $XDG_CONFIG_HOME/gotop/gotop.conf can now contain any field in Config. Syntax is simply KEY=VALUE. Values in config file are overridden by command-line arguments (although, there's a weakness in that there's no way to disable boolean fields enabled in the config).
  • Changed: Colorscheme registration is changed to be less hard-coded. Colorschemes can now be created and added to the repo, without having to also add hard-coded references elsewhere. This change is invisible to users.
  • Changed: Minor code refactoring to support Config file changes has resulted in better isolation. This change is invisible to users.

I'm slowly filling gaps in the cross-compiled binaries for other platforms; however, I only have access to Linux so YMMV if you're not Linux/AMD64. Darwin and OpenBSD are not available as they require headers to which I don't have access.

As an aside: gotop is, essentially, a single executable. I struggle to see the value of adding snaps, appimages, docker images, or flatpacks. Even RPM and debs are only there because Caleb added them at some point, and Newton's first law of thermodynamics and all that. Anyway, convince me otherwise and I'll add them.