ganttproject icon indicating copy to clipboard operation
ganttproject copied to clipboard

Change logs directory

Open m0squito opened this issue 8 years ago • 3 comments

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

m0squito avatar Oct 04 '16 14:10 m0squito

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😃.

chiyang10000 avatar Apr 08 '19 06:04 chiyang10000

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.

narekboghozian avatar Apr 24 '21 01:04 narekboghozian

Use the -log_file option.

jsung avatar Oct 18 '21 13:10 jsung