Skip to content

feat!: Write logs to $XDG_STATE_HOME#142

Merged
brujoand merged 1 commit intobrujoand:masterfrom
ianlewis:hook-log-config
Jun 14, 2025
Merged

feat!: Write logs to $XDG_STATE_HOME#142
brujoand merged 1 commit intobrujoand:masterfrom
ianlewis:hook-log-config

Conversation

@ianlewis
Copy link
Contributor

This PR updates the path that the hook.log gets written by default from $XDG_CONFIG_HOME/sbp to $XDG_STATE_HOME/sbp/log.

This is more in line with the XDG Base Directory Specification:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)

$XDG_STATE_HOME/sbp/log was chosen because $XDG_STATE_HOME/sbp could contain different types of state in the future and I think it makes sense to give logs their own directory.

Fixes #141

Signed-off-by: Ian Lewis <ian@ianlewis.org>
@brujoand
Copy link
Owner

A nice catch 👍

@brujoand brujoand merged commit 2326f2e into brujoand:master Jun 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The hook.log should be written to $XDG_STATE_HOME by default.

2 participants