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

Store logs in $HOME/.unison, rather than polluting $HOME #318

Closed
LocutusOfBorg opened this issue Feb 17, 2020 · 5 comments
Closed

Store logs in $HOME/.unison, rather than polluting $HOME #318

LocutusOfBorg opened this issue Feb 17, 2020 · 5 comments
Labels
defect unison fails to meet its specification (but doesn't crash; see also "crash") effort-low issue is likely resolvable with <= 5h of effort impact-low low importance

Comments

@LocutusOfBorg
Copy link

Hello, Ubuntu applied a similar patch some years ago, to avoid HOMEDIR being polluted with many conf files

Description: Change logfile location
 ... by prepending .unison to name of logfile in ubase/trace.ml
Author: Tan Rui Boon <ruiboon@gmail.com>
Bug-Debian: http://bugs.debian.org/484997
Bug-Ubuntu: https://bugs.launchpad.net/bugs/234365
Forwarded: no
Last-Update: 2011-09-10

--- a/ubase/trace.ml
+++ b/ubase/trace.ml
@@ -113,10 +113,10 @@ let logging =

 let logfile =
   Prefs.createFspath "logfile"
-    (Util.fileInHomeDir "unison.log")
+    (Util.fileInHomeDir ".unison/unison.log")
     "!logfile name"
     "By default, logging messages will be appended to the file
-     \\verb|unison.log| in your HOME directory.  Set this preference if
+     \\verb|unison.log| in your .unison directory.  Set this preference if
      you prefer another file."

 let logch = ref None

is it possible to upstream this change? thanks!

@gdt gdt changed the title please don't save configs in $HOME directory Store logs in $HOME/.unison, rather than polluting $HOME Sep 14, 2020
@gdt gdt added defect unison fails to meet its specification (but doesn't crash; see also "crash") effort-low issue is likely resolvable with <= 5h of effort impact-low low importance labels Sep 14, 2020
@gdt
Copy link
Collaborator

gdt commented Sep 14, 2020

A PR would help; seems like a reasonable change.

@bcpierce00
Copy link
Owner

bcpierce00 commented Sep 14, 2020 via email

@glondu
Copy link
Collaborator

glondu commented Sep 14, 2020

Note that the UNISON variable should be honored, maybe use Util.fileInUnisonDir instead?

@LocutusOfBorg
Copy link
Author

Sorry but I don't speak ocaml since lots of time, can anybody please do the pull request?

@glondu
Copy link
Collaborator

glondu commented Sep 15, 2020

can anybody please do the pull request?

I will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect unison fails to meet its specification (but doesn't crash; see also "crash") effort-low issue is likely resolvable with <= 5h of effort impact-low low importance
Projects
None yet
Development

No branches or pull requests

4 participants