You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to change the log file directory location (currently $TMPDIR) to use the XDG Base Directory Specification? Or at least have an option to change it in the configuration file, or at runtime (via a flag, not an env variable) if the log directory info is needed before configurations can be read.
It's not clear to me how transient those log files are meant to be (since by default they reside in /tmp which would get cleared every reboot at least), so either $XDG_STATE_HOME (more persistent, but not generally a candidate for backups) or $XDG_CACHE_HOME (closest to /tmp) would fit it seems.
For what it's worth, since presumably EDMC must be reading the environment to begin with somewhere, something like env.get("TMPDIR", env.get("XDG_CACHE_HOME", "/tmp") could perhaps do this semi-hackily with minimal churn (where it is assumed env is a dictionary of the environment). So any users who had explicitly set $TMPDIR and also have whichever XDG directory is chosen (between state and cache) set wouldn't see changes in behaviour.
Expected behavior
More or less explained above.
Considered workarounds
Just export TMPDIR=$XDG_CACHE_HOME, though I'd like to avoid this if possible (more variable pollution).
Alternatively launch EDMC with TMPDIR=... ./EDMark... every time.
Additional context
I mostly found it strange how the config and plugin locations properly respected the XDG spec but not the log directory, thus this ask.
The text was updated successfully, but these errors were encountered:
For this one, I think it makes more sense to make a new dir in app_dir_path (Linux: ~/.local/share/edmarketconnector/logs, Windows: %localappdata%/edmarketconnector/logs) to house this information. This keeps things unified as to where they will be (same place as plugins, fdevid files, etc) rather than scattering information all across the file system.
Describe the enhancement
Would it be possible to change the log file directory location (currently
$TMPDIR
) to use the XDG Base Directory Specification? Or at least have an option to change it in the configuration file, or at runtime (via a flag, not an env variable) if the log directory info is needed before configurations can be read.It's not clear to me how transient those log files are meant to be (since by default they reside in
/tmp
which would get cleared every reboot at least), so either$XDG_STATE_HOME
(more persistent, but not generally a candidate for backups) or$XDG_CACHE_HOME
(closest to/tmp
) would fit it seems.For what it's worth, since presumably EDMC must be reading the environment to begin with somewhere, something like
env.get("TMPDIR", env.get("XDG_CACHE_HOME", "/tmp")
could perhaps do this semi-hackily with minimal churn (where it is assumedenv
is a dictionary of the environment). So any users who had explicitly set$TMPDIR
and also have whichever XDG directory is chosen (between state and cache) set wouldn't see changes in behaviour.Expected behavior
More or less explained above.
Considered workarounds
Just export
TMPDIR=$XDG_CACHE_HOME
, though I'd like to avoid this if possible (more variable pollution).Alternatively launch EDMC with
TMPDIR=... ./EDMark...
every time.Additional context
I mostly found it strange how the config and plugin locations properly respected the XDG spec but not the log directory, thus this ask.
The text was updated successfully, but these errors were encountered: