I've tried to configure in both eclipse and intelliJ arguments with garbage collection logger for simple test program. Tried different kind of configurations and the log file has not been created.
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log
The garbage collection I prefer to create log from is G1 if possible.