Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log files should be placed in $XDG_DATA_HOME #49

Closed
pmattern opened this issue Jan 24, 2016 · 6 comments
Closed

log files should be placed in $XDG_DATA_HOME #49

pmattern opened this issue Jan 24, 2016 · 6 comments

Comments

@pmattern
Copy link
Contributor

According to both the specification and the habits of many other applications user-specific log files should be placed in $XDG_DATA_HOME instead of $XDG_CONFIG_HOME, probably best at a path like ~/.local/share/meteo-qt/meteo-qt.log.

@ozky
Copy link

ozky commented Mar 13, 2016

This would be good idea but as meteo-qt have only two files inside settings folder,i see no point to use two folders with one file inside both folders.

@dglent
Copy link
Owner

dglent commented Mar 16, 2016

Hello,
On the one hand is good to keep the standards, on the other hand maybe is worst as Otto says
Actually, i am in movement period, i will see this better later but tell me also your suggestions

Thanks

Dimitrios Glentadakis

@pmattern
Copy link
Contributor Author

The idea is that looking for certain kinds of files should be intuitive.
If a problem comes up, it's just convenient to know where to look for the logs. If on the other hand applications make exceptions / implement own concepts things get more complicated as it's hardly possible to memorize many exceptions of different programs.
Of course it may look strange to create two directories each comprising a single file only. But creating a directory isn't a big deal and all in all I still think the advantages would outweigh any eventual disadvantages.

On a side note in the meantime I realized that some software like Openbox place their log files in $XDG_CACHE_HOME but I don't think that this makes really sense either.

@dglent
Copy link
Owner

dglent commented Mar 30, 2016

The standard:
"$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used."
On my system the $XDG_CACHE_HOME is not defined
According this:
"$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used."
i looked in the ~/.cache directory, and i found only two log files: Openbox and Simplescan.
All other log files in home directory at situated in the config or the ~/.APPDIR/ or in ~/.local/share/data

I am a little confused, ok a log file contains non essential data, but maybe not ?
For example, you can delete the cache files of a database regularly but is the same for a log file ?

@pmattern
Copy link
Contributor Author

pmattern commented Mar 30, 2016

I agree definitions and common practice aren't exactly concise. Comparing with the system-wide directories in / a real counterpart to /var/log doesn't exist at all. But considering $XDG_CACHE_HOME and $XDG_DATA_HOME/applications I'd tend to say the latter is more suitable.
Is writing to systemd journal eventually an option, too?

@dglent
Copy link
Owner

dglent commented Dec 21, 2019

it seems acceptable to have the log and the configuration file at the same place

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

No branches or pull requests

3 participants