Move log file to $XDG_STATE_HOME
$XDG_STATE_HOME is new in the XDG Base Directory specification and
defines where "state files" should be stored. This includes things like
history and log files. If $XDG_STATE_HOME is either empty or not set it
defaults to ~/.local/state
.
Let's move our log file to this new location
Source: https://www.reddit.com/r/linux/comments/ny34vs/new_xdg_state_home_in_xdg_base_directory_spec/
Original proposal: https://lists.freedesktop.org/archives/xdg/2016-December/013803.html
Spec: https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
Quoted from the spec:
"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, …)
- current state of the application that can be reused on a restart (view, layout, open files, undo history, …)"