ganttproject
ganttproject copied to clipboard
Change logs directory
I'm using GP 2.8.1 (Pilsen) on macOS 10.12. Each time I start the app, it creates (if not already existing) two files: ganttproject.log and java0.log directly in my home directory. Is there a way to a) disable the log altogether or, b) change the directory to, say, /var/log?
I tried tinkering with the environment variable GP_LOG_DIR, I changed the Info.plist "-log" option to "false", but it only got rid of the ganttproject.log, not the java0.log.
Great app otherwise!
Thanks
Hello, I have found that modifying /Applications/GanttProject.app/Contents/Java/Classes/logging.properties
helps to change the location of java0.log
.
java.util.logging.FileHandler.pattern = /tmp/java%u.log
Hope this helps😃.
I also find this very annoying on MacOS, although I do like the app overall.
My workaround was to run this command to hide the ganttproject.log:
chflags hidden ~/ganttproject.log
and for the java.log I changed:
java.util.logging.FileHandler.pattern = %h/java%u.log
to:
java.util.logging.FileHandler.pattern = %h/.ganttproject.d/logs/java%u.log
in:
/Applications/GanttProject.app/Contents/runtime/Contents/Home/conf/logging.properties
and made a new logs
folder in .ganttproject.d
. Not sure if I disabled it but it isn't there anymore. During use the ganttproject.log.lck
file is still present however. If there's a fix for that too I'd like to know.
Use the -log_file
option.